printing via vba

  • Thread starter Thread starter neowok
  • Start date Start date
N

neowok

anyone? would be useful if I could get this to work as I have a nic
userform where users can select which printer they want with an optio
button, and it then prints 5 sheets from the spreadsheet to th
selected printer
 
xlDialogPrinterSetup=9, so ...



Option Explicit
Sub testme()
Dim okToPrint As Boolean
okToPrint = Application.Dialogs(xlDialogPrinterSetup).Show
If okToPrint Then
'print it
Else
MsgBox "cancelled!"
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top