Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Excel VBA Button

Posted on 2011-09-20
4
Medium Priority
?
172 Views
Last Modified: 2012-08-13
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
Comment
Question by:jtr209
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 12

Expert Comment

by:kgerb
ID: 36569696
Hello,
Will this work?

Kyle
Application.Dialogs(xlDialogPrint).Show

Open in new window

0
 
LVL 12

Accepted Solution

by:
kgerb earned 2000 total points
ID: 36569731
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
 

Author Comment

by:jtr209
ID: 36569759
Thank You, that worked great!
0
 
LVL 12

Expert Comment

by:kgerb
ID: 36569774
You're welcome.  Thanks for the grade!

Kyle
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question