I want to print a block of options from 1 to 6 tried If,Do and Select but not as I want it
can you help please.
In my sample only 3 txtAccs have a number and 3 txtInts have a value but it could be any number from 1 to 6
Construction.
Dim pPart(5) as String
On a form 2 textbox's txtAcc(5) as String,txtInt(5) as Single
After that code the result is:-
pPart(0) = "123778" 6.75
pPart(1) = "345456" 1.46
pPart(2) = "765211" 3.23
pPart(3) = ""
pPart(4) = ""
pPart(5) = ""
Now I want to print the results and this is my problem
line0 Printer.Print pPart(0)
line1 Printer.Print pPart(1)
line2 Printer.Print pPart(2)
as there are no further info in pPart(3 to 5)
line3 " --------------------"
line4 Total :- 11.44
can you help please.
In my sample only 3 txtAccs have a number and 3 txtInts have a value but it could be any number from 1 to 6
Construction.
Dim pPart(5) as String
On a form 2 textbox's txtAcc(5) as String,txtInt(5) as Single
Code:
VB6
Dim i as Integer
For i = 0 to 5
if txtAcc(i) <> vbNullString then
pPart(i) = txtAcc(i) & Space(1) & txtInt(i)
End If
Next i
pPart(0) = "123778" 6.75
pPart(1) = "345456" 1.46
pPart(2) = "765211" 3.23
pPart(3) = ""
pPart(4) = ""
pPart(5) = ""
Now I want to print the results and this is my problem
line0 Printer.Print pPart(0)
line1 Printer.Print pPart(1)
line2 Printer.Print pPart(2)
as there are no further info in pPart(3 to 5)
line3 " --------------------"
line4 Total :- 11.44