0

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.
Yen

2
Contributors
5
Replies
6
Views
3 Years
Discussion Span
Last Post by Minimalist
0

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"
  Printer.EndDoc
  cmdCancel_Click
End Su
0

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

0

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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.