Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

Excel VBA Button

I would like some VBA which I can use in an Excel button which will allow me to bring up the print window for a defined tab winthin the workbook.

Thank you
0
jtr209
Asked:
jtr209
  • 3
1 Solution
 
kgerbChief EngineerCommented:
Hello,
Will this work?

Kyle
Application.Dialogs(xlDialogPrint).Show

Open in new window

0
 
kgerbChief EngineerCommented:
If you would like to activate a specific sheet before showing the print dialogue then this will work.
Sub PrintSheet()
Sheets("Sheet2").Activate
Application.Dialogs(xlDialogPrint).Show
End Sub

Open in new window

0
 
jtr209Author Commented:
Thank You, that worked great!
0
 
kgerbChief EngineerCommented:
You're welcome.  Thanks for the grade!

Kyle
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now