Hi all,
I'm using vb6.
I'd like to get number of copies when user printing.
It means that after I adjust all information in vslexgrid and print it by
vslexgrid.printgrid "",true,10,20
after that print preview dialog appear and number of copies can be entered by users.
I want to get that number of copies . Page always fixs from 1 to 1.
Thanks a lot for any help.

Recommended Answers

All 5 Replies

This comes off a code snippet in this forum

Private Sub cmdPrint_Click()
  'set the printer and print something
  If Len(PrinterList.SelectedItem.Text) > 0 Then
    Set Printer = Printers(PrinterList.SelectedItem.Index - 1)
    Printer.Copies = NoCopies
  End If
  'add any print statements here that you want
  Printer.Print "hello"
End Su

Thanks a lot for your respond!

Sorry Minimalist,I have question: what is printerlist? what did you declare? when I apply in my code it noticed "Method data member not found". Sorry for my week exprience.Thanks

Printerlist is shows the printers installed on your system. So have to make sure that a printer is istalled, select the printer and print to it. I see if I can find the full code again and post it here later,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.