ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to copy header/footer info? (https://www.excelbanter.com/excel-programming/279502-how-copy-header-footer-info.html)

Capt'n Roy

How to copy header/footer info?
 
HI,
I am using Excel 2000 for development.
The problem I have is when I copy a sheets contents I do not get the header
information.
I would like to be able to set the new sheets header/footer equal to the
copied sheet.

Any suggestions on how to copy the header/footer information via a macro?

--
Capt'n Roy

))))º Think Fish <º((((<

To reply to my mail: Remove 2313 from email address.



Tom Ogilvy

How to copy header/footer info?
 
copy the sheet, don't copy the cells.

Dim sh as Object
With ActiveWorkbook
.Sheets("Template").Copy After:=.sheets(.sheets.count)
set sh = .sheets(.Sheets.count)
End with
MsgBox "Please rename this new sheet." & vbCrLf & _
"Right Click the new sheet tab." & vbCrLf & _
"Then choose RENAME."

'
' select button then delete it
'
sh.Shapes("Button 1").Delete
sh.Range("B4").Select

==================
Otherwise,

Worksheets(2).PageSetup.LeftHeader = Worksheets(1).PageSetup.LeftHeader
and so forth.

--
Regards,
Tom Ogilvy




"Capt'n Roy" wrote in message
...
HI,
I am using Excel 2000 for development.
The problem I have is when I copy a sheets contents I do not get the

header
information.
I would like to be able to set the new sheets header/footer equal to the
copied sheet.

Any suggestions on how to copy the header/footer information via a macro?

--
Capt'n Roy

))))º Think Fish <º((((<

To reply to my mail: Remove 2313 from email address.





Capt'n Roy

How to copy header/footer info?
 
Tom,
Thasnkks for the help.

--
Capt'n Roy

))))º Think Fish <º((((<

To reply to my mail: Remove 2313 from email address.

"Tom Ogilvy" wrote in message
...
copy the sheet, don't copy the cells.

Dim sh as Object
With ActiveWorkbook
.Sheets("Template").Copy After:=.sheets(.sheets.count)
set sh = .sheets(.Sheets.count)
End with
MsgBox "Please rename this new sheet." & vbCrLf & _
"Right Click the new sheet tab." & vbCrLf & _
"Then choose RENAME."

'
' select button then delete it
'
sh.Shapes("Button 1").Delete
sh.Range("B4").Select

==================
Otherwise,

Worksheets(2).PageSetup.LeftHeader = Worksheets(1).PageSetup.LeftHeader
and so forth.

--
Regards,
Tom Ogilvy




"Capt'n Roy" wrote in message
...
HI,
I am using Excel 2000 for development.
The problem I have is when I copy a sheets contents I do not get the

header
information.
I would like to be able to set the new sheets header/footer equal to

the
copied sheet.

Any suggestions on how to copy the header/footer information via a

macro?

--
Capt'n Roy

))))º Think Fish <º((((<

To reply to my mail: Remove 2313 from email address.








All times are GMT +1. The time now is 01:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com