View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Performing actions on multiple worksheets

Dim sh as object
for each sh in Application.ActiveWindow.SelectedSheets
sh.PageSetup.LeftFooter = "ABCD"
Next

--
Regards,
Tom Ogilvy

wrote in message
ups.com...
Hi,

I would like to add the functionality to select any number of
worksheets in my workbook and then make small changes to the footer of
each page.

The code to change the footer is no problem, but i can't work out how
to get Excel to perform this code on multiple worksheets. There needs
to be the ability to select random numbers of worksheets, for example
sometimes i want to select sheets 1,2 and 6; other time i may want to
select sheers 2,3,6,8 and 23.

Can anyone think of a way in which this can be achieved.

Many thanks,
Chris