Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to Select All Sheets and Make Change to Footer
Hi, I need help with this code, please. I want to select all the sheets in
one workbook and change the right footer to nothing, then select the A1 on the first worksheet. What am I missing? Thank you! Worksheets.Select PageSetup.RightFooter = "" Sheets(1).Select Range("A1").Select |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to Select All Sheets and Make Change to Footer
There is a problem wiht doin a pagesetup to all sheets. VBA can only do it
one sheet at a time... Your code is equivalent to Worksheets.Select Activesheet.PageSetup.RightFooter = "" '**Activesheet only Sheets(1).Select Range("A1").Select Try this... It does not select anything so your user will be left exactly where they were when the started the macro. Sub test() Dim wks As Worksheet For Each wks In Worksheets wks.PageSetup.RightFooter = "" Next wks End Sub -- HTH... Jim Thomlinson "Karin" wrote: Hi, I need help with this code, please. I want to select all the sheets in one workbook and change the right footer to nothing, then select the A1 on the first worksheet. What am I missing? Thank you! Worksheets.Select PageSetup.RightFooter = "" Sheets(1).Select Range("A1").Select |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to Select All Sheets and Make Change to Footer
It seems to go to next sheet and on from there without changing the sheet you
are on or the sheets before it. "Jim Thomlinson" wrote: There is a problem wiht doin a pagesetup to all sheets. VBA can only do it one sheet at a time... Your code is equivalent to Worksheets.Select Activesheet.PageSetup.RightFooter = "" '**Activesheet only Sheets(1).Select Range("A1").Select Try this... It does not select anything so your user will be left exactly where they were when the started the macro. Sub test() Dim wks As Worksheet For Each wks In Worksheets wks.PageSetup.RightFooter = "" Next wks End Sub -- HTH... Jim Thomlinson "Karin" wrote: Hi, I need help with this code, please. I want to select all the sheets in one workbook and change the right footer to nothing, then select the A1 on the first worksheet. What am I missing? Thank you! Worksheets.Select PageSetup.RightFooter = "" Sheets(1).Select Range("A1").Select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to select all sheets | Excel Discussion (Misc queries) | |||
macro to select all sheets | Excel Discussion (Misc queries) | |||
Macro to select and print sheets | Excel Discussion (Misc queries) | |||
I was asked to change excel spreadsheet to make multiple select | Excel Worksheet Functions | |||
how do i change footer settings on multiple sheets at the same ti. | Excel Worksheet Functions |