Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default Why is this PageSetup Macro So Slow?

Below is a page setup macro that runs real fast on my Excel2000 WinXP Pro
Desktop but real slow on Excel2000 WinXP Home Laptop.

I put msgboxes in to see what was slowing this macro up and the .TopMargin,
..BottomMargin, .Orientation and .PrintHeadings seemed to be taking a lot of time
to finish.

Any suggestions on how to speed this code up?

Thanks.

Dennis

Sub Page_Setup()

With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
.RightHeader = "&F &D &T &P/&N"
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
.Zoom = 75
.PrintHeadings = True
.PrintGridlines = True
End With
End Sub
  #6   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Depends on your version of XL. In XL03/04, xlLandscape is a defined
constant with the value of 2.


In article ,
wrote:

I found the reason the macro below didn't work.

In XL4 a landscape Orientation should be "2" not "xlLandscape". When I set
Orientation:="2" everything worked.

  #7   Report Post  
 
Posts: n/a
Default

I have Excel2000 and I don't know which version of XL it's using. All I know is
that when I changed xlLandscape to "2" the code worked. Thanks again for the
URL

JE McGimpsey wrote:

Depends on your version of XL. In XL03/04, xlLandscape is a defined
constant with the value of 2.


In article ,
wrote:

I found the reason the macro below didn't work.

In XL4 a landscape Orientation should be "2" not "xlLandscape". When I set
Orientation:="2" everything worked.


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
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Help with macro looping and color query function kevinm Excel Discussion (Misc queries) 10 May 26th 05 01:25 AM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM


All times are GMT +1. The time now is 12:49 PM.

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"