Solved

Excel VBA Button

Posted on 2011-09-20
4
165 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
  • 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

759 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now