Click to See Complete Forum and Search --> : VB help


Archie
April 17th, 2001, 06:12 PM
Can i ask please ask you guys one more? Can you figure out why this won't print? Thank you very much.

Private Sub mnuPrint_Click()

cdlPrint.ShowPrinter
For i = 0 To lstShopping.ListCount - 1
Printer.Print lstShopping.List(i)
Next

End Sub

Archie Kantzavelos

cksiow
April 17th, 2001, 07:13 PM
I think u should call
printer.NewPage at the begining and

printer.enddoc at the end like this

cdlPrint.ShowPrinter
printer.NewPage
For i = 0 To lstShopping.ListCount - 1
Printer.Print lstShopping.List(i)
Next
printer.enddoc

softweng
April 17th, 2001, 07:20 PM
What kind of error are you getting if any?
What happens when the code executes?
When I try the same code it works fine. You should add the Printer.EndDoc


statement after your for loop.

Kris
Software Engineer
Phoenix,AZ