![]() |
.PageSetup on multiple sheets in workbook
Due to the slowness encountered using the .PageSetup in Excel, I was
attempting to do a one-shot setup as opposed to doing a setup per page. The macro code is only setting up the active sheet when multiple sheets are selected. However, if I do it manually, it sets up all the sheets at once. Is this a glitch with VBA or is there code to get it to work properly? |
.PageSetup on multiple sheets in workbook
I found that trying to set pagesetup properties on ganged sheets
sucked up every bit of memory, took a long time and the display turned white. I quit trying to do that. <g Just loop thru the ActiveWindow.SelectedSheets using a For / Next loop and set the pagesetup properties for each sheet one at a time. Make sure to turn off the display of pagebreaks on each sheet before setting any pagesetup properties. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Steve" wrote in message Due to the slowness encountered using the .PageSetup in Excel, I was attempting to do a one-shot setup as opposed to doing a setup per page. The macro code is only setting up the active sheet when multiple sheets are selected. However, if I do it manually, it sets up all the sheets at once. Is this a glitch with VBA or is there code to get it to work properly? |
.PageSetup on multiple sheets in workbook
VBA doesn't support operations on grouped sheets for the most part. This
is a workaround posted by KeepItCool Set up a model sheet (the activesheet for the group), then put this at the end. Sheets(Array("Sheet1", "Sheet3")).Select SendKeys "{enter}" Application.Dialogs(xlDialogPageSetup).Show -- Regards, Tom Ogilvy "Steve" wrote in message ... Due to the slowness encountered using the .PageSetup in Excel, I was attempting to do a one-shot setup as opposed to doing a setup per page. The macro code is only setting up the active sheet when multiple sheets are selected. However, if I do it manually, it sets up all the sheets at once. Is this a glitch with VBA or is there code to get it to work properly? |
.PageSetup on multiple sheets in workbook
Reading these were helpful to me. An easy way if not done repetitively and
frequently is that if you keep your selected sheets active, you can run the Page Setup properties one time and it will afftect only the active sheet, but if you then reselect the Page Setup DB and pick OK, it will set those other sheets to the same settings. It does run somewhat slow but you can comment out those lines that you know haven't changed any and it speeds up considerably. HTH owlnevada "Tom Ogilvy" wrote: VBA doesn't support operations on grouped sheets for the most part. This is a workaround posted by KeepItCool Set up a model sheet (the activesheet for the group), then put this at the end. Sheets(Array("Sheet1", "Sheet3")).Select SendKeys "{enter}" Application.Dialogs(xlDialogPageSetup).Show -- Regards, Tom Ogilvy "Steve" wrote in message ... Due to the slowness encountered using the .PageSetup in Excel, I was attempting to do a one-shot setup as opposed to doing a setup per page. The macro code is only setting up the active sheet when multiple sheets are selected. However, if I do it manually, it sets up all the sheets at once. Is this a glitch with VBA or is there code to get it to work properly? |
All times are GMT +1. The time now is 04:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com