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.

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

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,

This article has been dead for over six months. Start a new discussion instead.