Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm creating a brand new workbook with multiple sheets from VB code. How do I programmatically assign Sheet Name as a header and 'Page 1 of ?' as a footer to all of them? Please advise. TIA |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Kurt
Select the first sheet by clicking on the tab; select the rest of the sheets by shift clicking on the last tab. Now select View | Header and Footer... | Header/Footer tab | modify the header and footer as required. If you add the tab name to the header and page information to the footer it will be applied to all the selected sheets Regards Trevor "Kurt Remlin" wrote in message om... Hi, I'm creating a brand new workbook with multiple sheets from VB code. How do I programmatically assign Sheet Name as a header and 'Page 1 of ?' as a footer to all of them? Please advise. TIA |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub tester()
Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets With ws.PageSetup .LeftHeader = "&A" .LeftFooter = "Page &P of &N" End With Next ws End Sub Kurt Remlin wrote: Hi, I'm creating a brand new workbook with multiple sheets from VB code. How do I programmatically assign Sheet Name as a header and 'Page 1 of ?' as a footer to all of them? Please advise. TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Header/Footer to update on all sheets | Excel Discussion (Misc queries) | |||
how to apply the same header or footer to all sheets in workbook | Excel Worksheet Functions | |||
Same Header/Footer-Different Sheets | Excel Discussion (Misc queries) | |||
add a header and or footer to all sheets/tabs | Excel Discussion (Misc queries) | |||
Using same Header & Footer for Multiple Sheets in Excel | Excel Discussion (Misc queries) |