New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Create Macro Button to print sheet in Excel 2010

Macros, VBA, Excel Automation, etc.

Create Macro Button to print sheet in Excel 2010

Postby lawitcher1 » Fri Nov 27, 2015 1:18 pm

I want to make a button in a sheet that will activate a Macro that will print the sheet. I came across this code:

Sub Macro1()
Application.Dialogs(xlDialogPrint).Show
End Sub

but cannot figure how to make the associated button in the sheet. Please advise
  • 0

lawitcher1
Regular
 
Posts: 72
Joined: Jan 29, 2012
Reputation: 0

Re: Create Macro Button to print sheet in Excel 2010

Postby NoSparks » Fri Nov 27, 2015 7:45 pm

On the Developer Ribbon, click Insert, click the Form Control Button, outline on the sheet where you want the button.
You then get a dialogue giving three options:
New -> you can type or paste in the macro you want
Record -> Excel will build the macro for you as you perform what you want to happen
or you can pick from the list of existing macros.

Don't have the Developer Ribbon ?
see this
  • 0

NoSparks
Excel Hobbyist
 
Posts: 637
Joined: May 28, 2014
Reputation: 103
Excel Version: 2010


Return to Macros and VBA Questions

Who is online

Users browsing this forum: Google Adsense [Bot] and 242 guests