How do I print to a printer in VB 6?

  • Thread starter Thread starter bnadler
  • Start date Start date
B

bnadler

I am just learning VB6 and I do not see how data is sent to a printer. There
is not a printer method that I can find
 
I have tried using Printer.Print but I cannot find the Printer object
anywhere. It isn't even listed in the help section.
 
Microsfot documentation is really bad. they don't tell you what type object
you are suppose top use. In this case the object is the worksheet and you
can't change printers. The printer is the default printer on you PC.

activesheet.printout
 
You may want to ask in a forum dedicated to VB--not excel.

If you really meant you wanted to print something in excel's vba:

worksheets("Sheet999").printout 'preview:=true
or
worksheets("sheet999").range("x1:Z9").printout 'preview:=true
 
Back
Top