View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Page Setup for multiple sheets

KeepItCool posted a VBA approach that uses that method by simulating
keystokes:


This is replicating the fastest manual way...

sheets(array("sheet2","sheet3","sheet4")).select
sheets("sheet3").activate
SendKeys "{enter}"
Application.Dialogs(xlDialogPageSetup).Show



keepITcool

--
Regards,
Tom Ogilvy


philip wrote in message
...
A manual trick I heard about to get this done easily is
the following "recepy" :

1. Set up the page-setup as you need it on one of the tab
sheets
2. Select the tab sheet with the desired page-setup
3. With the control key pressed, select each of the other
tab sheets on which you want to apply the page-setup
4. Go to the page setup selection on the file menu
5. Click "OK" without changing anything

Result of these 5 steps : the page-setup defined in step
1 is copied over to all of the selected sheets.

I don''t know how to do a VBA routine without looping,
but this trick works and it works very fast ...
-----Original Message-----
Hi:

See this post by Tom Ogilvy, with a reference to John

Green.

http://google.com/groups?selm=e2mdJn40CHA.868%

40TK2MSFTNGP12&rnum=4

Regards,

Vasant.


"MDC" wrote in

message
...
I need to set multiple worksheets with the same Page
setup. e.g. .25 borders, 1 page wide, 1 page tall,

etc.
BUT looping through the sheets significantly slows down
the performace of my code. Is there a better way to
accomplish this?



.