Excel vba: Create a Print button
This post descibes how to create a print button on a excel sheet.
Create button (Form Control)
- Select sheet "Invoice"
- Click "Developer tab" on the ribbon
- Click "Insert" button
- Click Button (Form Control)
- Create button "Print Invoice"
Create macro
- Press Alt-F11 to open visual basic editor
- Click Module on the Insert menu
- Copy and paste "Sub Macro1" code below into module
Sub Macro1() Application.Dialogs(xlDialogPrint).Show End Sub
Download excel sample file for this tutorial.
Print invoice.xls
(Excel 97-2003 Workbook *.xls)
Related posts:
Excel:Print headers on every page
Toggle a macro on/off using a button

















