I have a spreadsheet (Called "Expenses") with 3 (A,B,C) tabs. How do I create a macro to print all tabs. KOmegah
re: "I have a spreadsheet (Called "Expenses") with 3 (A,B,C) tabs." I assume that you mean you have workbook called "Expenses" with 3 sheets named A, B and C.
1 - Press Alt-F11 to open the VBA editor.
2 - In the left hand pane, Double Click the word "ThisWorkbook"
3 - Paste in the following codeWhenever you Print the workbook, the code will "intercept" the Print command and run, printing every sheet in the workbook.
Private Sub Workbook_BeforePrint(Cancel As Boolean) Application.EnableEvents = False For shts = 1 To Sheets.Count Sheets(shts).PrintOut Next Cancel = True Application.EnableEvents = True End SubPosting Tip: Before posting Data or VBA Code, read this How-To.