Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro for page setup of worksheets is slow

Actually the too many continuations error was in the proc delcaration--not in
the code itself.

But my note to JE was essentially a request for him to update his web page.
That way, anyone who referred to that page wouldn't have to make the same fix.

jayray wrote:

On Jun 6, 5:52 pm, Dave Peterson wrote:
But I can use alt-f8 if I want to type in the name of the procedure and the
parms that I want to pass:

'PageSetupXL4M "qwer"'

Passes "qwer" to the first parm (lefthead in JE's code).

(but this would become unmanageable very quickly, well for me, at least.

JE:

I'm using xl2003 (wintel) and when I copied your code into a new workbook's
general module, I got a "too many line continuations" error in the declaration
section.

I'm not sure if this is a new problem, or if I never stole this from your site
<vbg.

JE McGimpsey wrote:

In article .com,
wrote:


However, I find that the macro PageSetupXL4M is not identified in the
macro run form (Alt+F8), so I cannot launch it. What am I doing
wrong?


You're not doing anything wrong. Since the macro has arguments, it won't
appear in the macro run dialog (since there's no way to supply the
arguments).


You can either rewrite the macro to hardcode the arguments, or else call
the macro with the appropriate arguments.


--

Dave Peterson


For the too many continuations errors message, just delete the
continuations so that every two lines become one:

sPgSetup = "PAGE.SETUP(" & sHead & c & sFoot & c & _
LeftMarginInches & c & RightMarginInches & c & _

becomes

sPgSetup = "PAGE.SETUP(" & sHead & c & sFoot & c & LeftMarginInches &
c & RightMarginInches & c & _

Or delete more and make each line into a longer line...

You can do the same for the continuations in the pgSetup
concatenations, but don't delete the parameter strings as the order
there seems to define how the XL4 macros read the parameters.


--

Dave Peterson
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
EXcel 2003 Page setup slow Ian Excel Discussion (Misc queries) 5 April 22nd 10 12:48 PM
Page Setup Macro runs slow William G Excel Discussion (Misc queries) 3 March 31st 09 07:31 PM
Page Setup SLOW trying excel 4..... [email protected] New Users to Excel 0 February 20th 08 10:54 PM
Page Setup for multiple worksheets macro problem KonaAl Excel Discussion (Misc queries) 3 January 7th 06 02:33 AM
Excell 2003 Page Setup Slow JT Lovell Excel Programming 6 September 17th 04 02:39 AM


All times are GMT +1. The time now is 02:10 PM.

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

About Us

"It's about Microsoft Excel"