Question : Dialog box for making the user select the printer

Can someone help me with a piece of VB code for excel. Where the user is prompted to select which printer he wants to print the sheet on. It should ideally look like a dialogue box when you click File -> Print on the excel spreadsheet.

Answer : Dialog box for making the user select the printer

Try

Application.Dialogs(xlDialogPrint).Show arg12:=True

That should open the dialog box with the "Print Selection" option ticked

You may also want to check out the PrintOut function which will automatically print to the default printer (No dialogs)

Activesheet.PrintOut(From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName)

Simon
Random Solutions  
 
programming4us programming4us