Fix an Excel for Mac Macro That Does Not Print the Workbook
Question details
The user needs a recorded macro to print after configuring page settings.

- Product
- Microsoft Excel 2016 for Mac
- Device & OS
- Mac
- Scenario
- A recorded VBA macro sets up pages for printing a worksheet or workbook.
- Observed behavior
- The page settings are configured, but the macro does not contain a command to send the worksheet or workbook to the printer.
Open the workbook in Excel for Mac and make sure a printer is available. Identify whether you want to print only the active worksheet or the entire workbook.
Add a PrintOut command to the Excel VBA macro
Use this solution when the macro changes page settings but does not issue a print command.
In Excel, open the workbook and select Tools > Macro > Visual Basic Editor.
In the Project window, open the module containing the recorded macro and locate its page-setup code.
After the page-setup code and before End Sub, add ActiveSheet.PrintOut to print the active worksheet. To print the entire active workbook instead, use ActiveWorkbook.PrintOut.
Return to Excel, select Tools > Macro > Macros, choose the macro, and click Run. Check that the intended worksheet or workbook is sent to the printer.

Print spreadsheets with WPS Office
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and support for Microsoft Excel formats, making it easy to move everyday spreadsheet work. You can use its print options to print sheets without relying on the Excel macro; it does not repair Excel VBA code.

Frequently Asked Questions
Why does my recorded Excel macro change page settings but not print?
Page-setup commands only configure how the pages will look. Add a PrintOut command after those settings and before End Sub to send the output to the printer.
How do I print only the active worksheet from VBA?
Add ActiveSheet.PrintOut after the page-setup code. Before running the macro, select the worksheet you want to print.
How can I print the whole workbook instead of one sheet?
Use ActiveWorkbook.PrintOut in the macro instead of ActiveSheet.PrintOut, and make sure the intended workbook is active when you run it.
Where can I edit the recorded macro in Excel for Mac?
Open the workbook, select Tools > Macro > Visual Basic Editor, and open the module containing the macro in the Project window.




