Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I have done everything that the help has given me. I need to print out a
spreadsheet that has 31 tabs. I want to change the original print area to a new one on all the sheets. I can't seem to accomplish this. I have tried to right click the tabs and choose select (group) I have tried to name ranges with the ='day1:day31'!a1:j48. This only works on 1 or two pages. Is there a way to remove an existing print range and replace it with a new one in an entire workbook? This would be helpful as I need to print out the daily production for 2 1/2 years (1000 sheets of paper). |
#2
![]() |
|||
|
|||
![]()
I don't believe you can change the print area on multiple sheets
simultaneously manually by grouping sheets. However, you can do it by using a macro. Try the below code. Sub SetPrintAreaAllSheets() For Each Sh In ActiveWorkbook.Sheets Sh.PageSetup.PrintArea = "A1:C25" Next Sh End Sub Ensure you run it from the active workbook (the workbook you want to set the print area in. It will set the print area for all the sheets in the workbook. Of course you must substitute your print area range where I have "A1:C25". Hope this helps. Thanks, Bill Horton "lschuh" wrote: I have done everything that the help has given me. I need to print out a spreadsheet that has 31 tabs. I want to change the original print area to a new one on all the sheets. I can't seem to accomplish this. I have tried to right click the tabs and choose select (group) I have tried to name ranges with the ='day1:day31'!a1:j48. This only works on 1 or two pages. Is there a way to remove an existing print range and replace it with a new one in an entire workbook? This would be helpful as I need to print out the daily production for 2 1/2 years (1000 sheets of paper). |
#3
![]() |
|||
|
|||
![]()
I did that and what I am getting is one sheet only. I put the macro in this
workbook and placed my cursor in a1 of sheet "day0". Did I do something wrong? "William Horton" wrote: I don't believe you can change the print area on multiple sheets simultaneously manually by grouping sheets. However, you can do it by using a macro. Try the below code. Sub SetPrintAreaAllSheets() For Each Sh In ActiveWorkbook.Sheets Sh.PageSetup.PrintArea = "A1:C25" Next Sh End Sub Ensure you run it from the active workbook (the workbook you want to set the print area in. It will set the print area for all the sheets in the workbook. Of course you must substitute your print area range where I have "A1:C25". Hope this helps. Thanks, Bill Horton "lschuh" wrote: I have done everything that the help has given me. I need to print out a spreadsheet that has 31 tabs. I want to change the original print area to a new one on all the sheets. I can't seem to accomplish this. I have tried to right click the tabs and choose select (group) I have tried to name ranges with the ='day1:day31'!a1:j48. This only works on 1 or two pages. Is there a way to remove an existing print range and replace it with a new one in an entire workbook? This would be helpful as I need to print out the daily production for 2 1/2 years (1000 sheets of paper). |
#4
![]() |
|||
|
|||
![]()
It should work. It's working for me. Dumb question, but are you running the
macro properly. Put your cursor anywhere in the workbook you want to set the print areas for. Then from the Excel menu path choose Tools / Macro / Macros. Then highlight the macro you created (SetPrintAreasAllSheets) and click on Run. This should work. "lschuh" wrote: I did that and what I am getting is one sheet only. I put the macro in this workbook and placed my cursor in a1 of sheet "day0". Did I do something wrong? "William Horton" wrote: I don't believe you can change the print area on multiple sheets simultaneously manually by grouping sheets. However, you can do it by using a macro. Try the below code. Sub SetPrintAreaAllSheets() For Each Sh In ActiveWorkbook.Sheets Sh.PageSetup.PrintArea = "A1:C25" Next Sh End Sub Ensure you run it from the active workbook (the workbook you want to set the print area in. It will set the print area for all the sheets in the workbook. Of course you must substitute your print area range where I have "A1:C25". Hope this helps. Thanks, Bill Horton "lschuh" wrote: I have done everything that the help has given me. I need to print out a spreadsheet that has 31 tabs. I want to change the original print area to a new one on all the sheets. I can't seem to accomplish this. I have tried to right click the tabs and choose select (group) I have tried to name ranges with the ='day1:day31'!a1:j48. This only works on 1 or two pages. Is there a way to remove an existing print range and replace it with a new one in an entire workbook? This would be helpful as I need to print out the daily production for 2 1/2 years (1000 sheets of paper). |
#5
![]() |
|||
|
|||
![]()
Sub setprintareaallsheets()
Dim sh As Worksheet For Each sh In ActiveWorkbook.Sheets sh.PageSetup.PrintArea = "a1:j48" Next sh End Sub this is what I put in the this workbook I went to the tools, macros, picked the macro and chose run. I only got 1 sheet. I don't know how to print the next worksheet. I don't know how to code that. "William Horton" wrote: It should work. It's working for me. Dumb question, but are you running the macro properly. Put your cursor anywhere in the workbook you want to set the print areas for. Then from the Excel menu path choose Tools / Macro / Macros. Then highlight the macro you created (SetPrintAreasAllSheets) and click on Run. This should work. "lschuh" wrote: I did that and what I am getting is one sheet only. I put the macro in this workbook and placed my cursor in a1 of sheet "day0". Did I do something wrong? "William Horton" wrote: I don't believe you can change the print area on multiple sheets simultaneously manually by grouping sheets. However, you can do it by using a macro. Try the below code. Sub SetPrintAreaAllSheets() For Each Sh In ActiveWorkbook.Sheets Sh.PageSetup.PrintArea = "A1:C25" Next Sh End Sub Ensure you run it from the active workbook (the workbook you want to set the print area in. It will set the print area for all the sheets in the workbook. Of course you must substitute your print area range where I have "A1:C25". Hope this helps. Thanks, Bill Horton "lschuh" wrote: I have done everything that the help has given me. I need to print out a spreadsheet that has 31 tabs. I want to change the original print area to a new one on all the sheets. I can't seem to accomplish this. I have tried to right click the tabs and choose select (group) I have tried to name ranges with the ='day1:day31'!a1:j48. This only works on 1 or two pages. Is there a way to remove an existing print range and replace it with a new one in an entire workbook? This would be helpful as I need to print out the daily production for 2 1/2 years (1000 sheets of paper). |
#6
![]() |
|||
|
|||
![]()
Oh, I think I understand you now. Running the code I provided you with
should have successfully set the "Print Area" of each worksheet in your workbook. It will NOT actually print any of your worksheets. To print all of the worksheets in a workbook choose from the Excel menu path File / Print and then choose the Entire Workbook option in the print what section at the bottom of the dialog box. Choose whatever other options you want and click OK. This should print the Entire workbook using the print area that you set on all the worksheets using the macro I provided. Hope this is what you needed. Thanks, Bill Horton "lschuh" wrote: Sub setprintareaallsheets() Dim sh As Worksheet For Each sh In ActiveWorkbook.Sheets sh.PageSetup.PrintArea = "a1:j48" Next sh End Sub this is what I put in the this workbook I went to the tools, macros, picked the macro and chose run. I only got 1 sheet. I don't know how to print the next worksheet. I don't know how to code that. "William Horton" wrote: It should work. It's working for me. Dumb question, but are you running the macro properly. Put your cursor anywhere in the workbook you want to set the print areas for. Then from the Excel menu path choose Tools / Macro / Macros. Then highlight the macro you created (SetPrintAreasAllSheets) and click on Run. This should work. "lschuh" wrote: I did that and what I am getting is one sheet only. I put the macro in this workbook and placed my cursor in a1 of sheet "day0". Did I do something wrong? "William Horton" wrote: I don't believe you can change the print area on multiple sheets simultaneously manually by grouping sheets. However, you can do it by using a macro. Try the below code. Sub SetPrintAreaAllSheets() For Each Sh In ActiveWorkbook.Sheets Sh.PageSetup.PrintArea = "A1:C25" Next Sh End Sub Ensure you run it from the active workbook (the workbook you want to set the print area in. It will set the print area for all the sheets in the workbook. Of course you must substitute your print area range where I have "A1:C25". Hope this helps. Thanks, Bill Horton "lschuh" wrote: I have done everything that the help has given me. I need to print out a spreadsheet that has 31 tabs. I want to change the original print area to a new one on all the sheets. I can't seem to accomplish this. I have tried to right click the tabs and choose select (group) I have tried to name ranges with the ='day1:day31'!a1:j48. This only works on 1 or two pages. Is there a way to remove an existing print range and replace it with a new one in an entire workbook? This would be helpful as I need to print out the daily production for 2 1/2 years (1000 sheets of paper). |
#7
![]() |
|||
|
|||
![]()
You are a God send. Thank you so much you can't imagine how much time that
will save me. Thank you again. This fix has been the only good thing that this day brought. Take care. "William Horton" wrote: It should work. It's working for me. Dumb question, but are you running the macro properly. Put your cursor anywhere in the workbook you want to set the print areas for. Then from the Excel menu path choose Tools / Macro / Macros. Then highlight the macro you created (SetPrintAreasAllSheets) and click on Run. This should work. "lschuh" wrote: I did that and what I am getting is one sheet only. I put the macro in this workbook and placed my cursor in a1 of sheet "day0". Did I do something wrong? "William Horton" wrote: I don't believe you can change the print area on multiple sheets simultaneously manually by grouping sheets. However, you can do it by using a macro. Try the below code. Sub SetPrintAreaAllSheets() For Each Sh In ActiveWorkbook.Sheets Sh.PageSetup.PrintArea = "A1:C25" Next Sh End Sub Ensure you run it from the active workbook (the workbook you want to set the print area in. It will set the print area for all the sheets in the workbook. Of course you must substitute your print area range where I have "A1:C25". Hope this helps. Thanks, Bill Horton "lschuh" wrote: I have done everything that the help has given me. I need to print out a spreadsheet that has 31 tabs. I want to change the original print area to a new one on all the sheets. I can't seem to accomplish this. I have tried to right click the tabs and choose select (group) I have tried to name ranges with the ='day1:day31'!a1:j48. This only works on 1 or two pages. Is there a way to remove an existing print range and replace it with a new one in an entire workbook? This would be helpful as I need to print out the daily production for 2 1/2 years (1000 sheets of paper). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Print all charts in a workbook (multiple worksheets) | Charts and Charting in Excel | |||
Print Spreadsheet tabs in a Workbook to a List? | Excel Discussion (Misc queries) | |||
Excel should let me set the print default to "Entire Workbook". | Setting up and Configuration of Excel | |||
Changing print area | Excel Discussion (Misc queries) |