Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Far Far is offline
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Setup Macro runs slow William G Excel Discussion (Misc queries) 3 March 31st 09 07:31 PM
can you change the page layout of all sheets in a workbook sjkling Excel Worksheet Functions 2 October 9th 08 11:05 PM
page breaks and margin millions Excel Discussion (Misc queries) 0 January 23rd 08 12:16 PM
Excel 2000 macro for page format slow [email protected] Excel Discussion (Misc queries) 2 October 6th 06 11:55 PM
Excel 2000 macro for page format slow [email protected] Excel Discussion (Misc queries) 0 October 6th 06 06:50 PM


All times are GMT +1. The time now is 01:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"