Buongiorno.Premetto che non sono un programmatore VB ma che per questioni si lavoro mi trovo a doverlo usare per una piccola routine.
Ho un vecchissimo file .bas il cui listato è questo

1 Clear , , 2000
5 TEST = 0
10 OPEN "I", #1, "IDEA.dat"
20 OPEN "o", #2, "ORDI.TXT"
30 If EOF(1) = -1 Then Close #1: If COD1 < 600000 Then GoSub 305: GoTo 360 Else GoTo 360
39 Line Input #1, campo$
41 If Left$(campo$, 1) = Chr$(2) Then GoTo 30
42 If Mid$(campo$, 14, 1) <> Chr$(66) Then GoTo 30
43 QTA1$ = Mid$(campo$, 2, 12): C66$ = Mid$(campo$, 8, 1): C6 = Val(C66$)
44 QTA2 = Val(QTA1$)
45 If QTA2 < 80000 Then VAR1$ = Mid$(campo$, 10, 4): GoTo 30
47 If QTA2 < 600000 Then If C6 = 1 Then tio$ = "PEC"
49 If QTA2 < 600000 Then If C6 = 2 Then tio$ = "TIR"
51 If QTA2 < 600000 Then If C6 = 3 Then tio$ = "TAT"
53 If QTA2 < 600000 Then If C6 = 4 Then tio$ = "TMO"
55 If QTA2 < 600000 Then If C6 = 5 Then tio$ = "TPR"
56 If QTA2 = 699000 And QTAM = 0 Then If C6 = 6 Then QTAM = QTA: tipos$ = tio$: GoTo 30
57 If QTA2 = 699000 And QTAM > 0 Then GoTo 30
58 If QTA2 = 600999 Then If C6 = 6 Then tx = 1: GoTo 30
59 If QTA2 < 600000 Then C6 = C6 * 100000
61 If QTA2 < 600000 Then QTA = QTA + ((QTA2 - C6) / 100): GoTo 30
70 ART$ = Mid$(campo$, 2, 5)
72 DIS$ = Mid$(campo$, 7, 3)
73 Var$ = Mid$(campo$, 10, 4)
75 If QTA2 > 600000 And TEST > 0 Then GoSub 305
80 If QTA2 > 600000 And TEST = 0 Then ART1$ = ART$: DIS1$ = DIS$: VAR1$ = Var$: GoSub 105: GoTo 30
105 TEST = TEST + 1: tio$ = "REF"
106 c1 = 0: c2 = 0: c3 = 0: QTA3 = 0
107 If Mid$(campo$, 15, 1) <> Chr$(93) Then QTA = 0: GoTo 30
108 c1$ = Mid$(campo$, 16, 1): c11 = Asc(c1$)
109 If (c11 >= 48) And (c11 <= 57) Then c1 = Val(c1$)
110 c2$ = Mid$(campo$, 17, 1): c22 = Asc(c2$)
120 If (c22 >= 48) And (c22 <= 57) Then c2 = Val(c2$): c1 = c1 * 10
130 c3$ = Mid$(campo$, 18, 1): c33 = Asc(c3$)
140 If (c33 >= 48) And (c33 <= 57) Then c3 = Val(c3$): c1 = c1 * 10: c2 = c2 * 10
200 QTA3 = c1 + c2 + c3
300 Return
305 If QTA = 0 Then QTA = QTA3
306 If QTAM > 0 Then QTA = QTAM: tio$ = tipos$
310 Print ART1$, DIS1$, VAR1$, QTA, tio$
320 Write #2, ART1$, DIS1$, VAR1$, QTA, tio$
330 TEST = 0: QTA = 0: QTA3 = 0
334 If tx = 1 Then QTAM = 0: tipos$ = "": tx = 0
350 Return
360 Cls
380 Close #1

Apro il file con VB 6.0 e viene aperto come modulo.
come faccio ad utilizzare il pgm e modificarlo con vb 6 visto che solo lanciandolo per fare il debug mi da errore ?

Un grazie disperato a tutti


390 Close #2