Private Sub Command4_Click()
Dim l As Single, a As String, j As String, y As Long, p As Long, p1 As Long, p2 As Long
j = ""
Open "C:\Documents and Settings\Pippo\Dati applicazioni\ArchiviRotanti\Estr1.txt" For Output As #5
Open "c:\Documents and Settings\Pippo\Dati applicazioni\ArchiviRotanti\Estrazioni.txt" For Input As 1
While Not EOF(1)
Line Input #1, a
y = y + 1
p2 = 0
If y > 90 Then y = 1
j = j + Left(a, 15)
For l = 16 To Len(a) Step 3
p = Val(Mid(a, l, 3))
p2 = p2 + 1
If p > 0 Then
p1 = p + x(1, y)
If p1 > 90 Then p1 = p1 - 90
If p2 < 55 Then
j = j + ForNumero(p1, 2) + ";" ' fornumero è una funzione che formatta i numeri a 2 spazi
Else
j = j + ForNumero(p1, 2)
End If
Else
j = j + Mid(a, l, 3)
End If
Next
Print #5, j
j = ""
Wend
Close #1
Close #5
End Sub
Dim l As Single, a As String, j As String, y As Long, p As Long, p1 As Long, p2 As Long
j = ""
Open "C:\Documents and Settings\Pippo\Dati applicazioni\ArchiviRotanti\Estr1.txt" For Output As #5
Open "c:\Documents and Settings\Pippo\Dati applicazioni\ArchiviRotanti\Estrazioni.txt" For Input As 1
While Not EOF(1)
Line Input #1, a
y = y + 1
p2 = 0
If y > 90 Then y = 1
j = j + Left(a, 15)
For l = 16 To Len(a) Step 3
p = Val(Mid(a, l, 3))
p2 = p2 + 1
If p > 0 Then
p1 = p + x(1, y)
If p1 > 90 Then p1 = p1 - 90
If p2 < 55 Then
j = j + ForNumero(p1, 2) + ";" ' fornumero è una funzione che formatta i numeri a 2 spazi
Else
j = j + ForNumero(p1, 2)
End If
Else
j = j + Mid(a, l, 3)
End If
Next
Print #5, j
j = ""
Wend
Close #1
Close #5
End Sub