hi, I'm getting an error poiting to X saying that it is no defined:
Code:Dim strPrint As Integer
For z = 0 To ListPrintOut.ListCount - 1
strPrint = strPrint & ListPrintOut.List(z) & vbCrLf
Next z
Printer.Print strPrint
Printer.EndDoc
Printable View
hi, I'm getting an error poiting to X saying that it is no defined:
Code:Dim strPrint As Integer
For z = 0 To ListPrintOut.ListCount - 1
strPrint = strPrint & ListPrintOut.List(z) & vbCrLf
Next z
Printer.Print strPrint
Printer.EndDoc
I don't see an X, dimava...???
sorry, I meant z
well, the obvious question is : Do you have "Option Explicit" at the top of your code?
ok, thanks
no problem, sometimes I forget to declare the variables for my For...Next loops, too :D
now it points to this line:
having error 13 'over flow'Code:strPrint = strPrint & ListPrintOut.List(z) & vbCrLf
but this is only when there are items in the list box
strPrint is declared as an Integer, that's why, it should be a String...:D
yep, thanks ;) http://www.vbforums.com/