Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Applying a specific Print setting to all worksheets

i have a form which displays the list of all worksheets of its
corresponding workbook... so when i select say for example 1st
worksheet from tat list print setting of the selected sheet should be
applied to all the sheets of tat workbook..... it sounds complex .....
but hope anyone can provide me code snippet for this... or macro to
configure the print setting(like page setup,zoom,margin) and then
applying for all sheets .....
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Applying a specific Print setting to all worksheets

Record a macro when you change a print setting for any of those sheets.

Delete the settings that you don't care about (it'll speed up the code).

Then you could use:

Dim MstrWks as worksheet
dim wks as worksheet

'me.combobox1 contains the worksheet name
set mstrwks = nothing
on error resume next
set mstrwks = activeworkbook.worksheets(me.combobox1.value)
on error goto 0

if mstrwks is nothing then
'nothing chosen (yet)
exit sub???
end if

for each wks in activeworkbook.worksheets
if wks.name = mstrwks.name then
'skip it
else
'do all the work you want.
with wks.PageSetup
.LeftHeader = mstrwks.pagesetup.leftheader
.centerHeader = mstrwks.pagesetup.centerheader
'and on and on...
end with
end if
next wks

There isn't a way to get all those properties as one object.

(untested, uncompiled. Watch for typos.)



vicky wrote:

i have a form which displays the list of all worksheets of its
corresponding workbook... so when i select say for example 1st
worksheet from tat list print setting of the selected sheet should be
applied to all the sheets of tat workbook..... it sounds complex .....
but hope anyone can provide me code snippet for this... or macro to
configure the print setting(like page setup,zoom,margin) and then
applying for all sheets .....


--

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
Setting Specific Cells To Not Print Jeremy.Whitney Excel Discussion (Misc queries) 2 July 31st 06 02:20 AM
print specific worksheets in specific order. jarvo Excel Programming 1 April 11th 06 11:05 AM
How to print specific worksheets Susan Hayes Excel Programming 2 January 8th 06 11:36 PM
Macro Security Setting not applying chaves Excel Programming 1 November 16th 04 02:43 AM


All times are GMT +1. The time now is 11:09 AM.

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"