I use Application.Dialogs(xlDialogPrinterSetup).Show for selecting a printer on a custom print userform in Excel. It works great for selecting the printer, but the "Setup..." button on the dialog does not access the right printer until after you hit OK, then access the dialog again, and hit "Setup..." a second time.

Say you have two printers, P1, P2, and P1 is the default printer. You press the "Select Printer" button which calls Application.Dialogs(xlDialogPrinterSetup).Show. Then select P2, and press "Setup..." (to change printer properties). This gives properties for P1, rather than P2, even though P2 is highlighted. Apparently the dialog doesn't pass along the highlighted printer to the properties query, but rather passes the active printer.

Is there any way around this so you don't have to access the dialog twice in order to change printer properties? Here is the code I use...

Private Sub CommandButton4_Click() 
'print setup (select printer) 
Application.Dialogs(xlDialogPrinterSetup).Show 
End Sub