Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Slow Macro on Page Margin Change for all sheets
I have a Macro that changes the Print Page Margin on all
worksheets, but it very slow. Is there a way to speed this up by forcing a calcualtion of the the Margings at the end of the Macro doing recalc on all sheets at once? ' Defines standard Footer & Header settings For Each wks In Worksheets If wks.Visible = xlSheetVisible Then wks.PageSetup.LeftMargin = Application.InchesToPoints(0.21) wks.PageSetup.RightMargin = Application.InchesToPoints(0.23) End If Next wks End Sub Thanks you for the help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Slow Macro on Page Margin Change for all sheets
I haven't tried this on your particular problem, but if you avoid selecting
things macros run a whole lot faster. Why don't you try this: Application.ScreenUpdating = False 'then all your code, except skip the wks.visible part and just set all the margins. TH On 4/22/04 12:38, in article , "Far" wrote: I have a Macro that changes the Print Page Margin on all worksheets, but it very slow. Is there a way to speed this up by forcing a calcualtion of the the Margings at the end of the Macro doing recalc on all sheets at once? ' Defines standard Footer & Header settings For Each wks In Worksheets If wks.Visible = xlSheetVisible Then wks.PageSetup.LeftMargin = Application.InchesToPoints(0.21) wks.PageSetup.RightMargin = Application.InchesToPoints(0.23) End If Next wks End Sub Thanks you for the help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Page Setup Macro runs slow | Excel Discussion (Misc queries) | |||
can you change the page layout of all sheets in a workbook | Excel Worksheet Functions | |||
page breaks and margin | Excel Discussion (Misc queries) | |||
Excel 2000 macro for page format slow | Excel Discussion (Misc queries) | |||
Excel 2000 macro for page format slow | Excel Discussion (Misc queries) |