Solved

Excel VBA Button

Posted on 2011-09-20
4
170 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 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

624 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