ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problem Copying Header/Footer (https://www.excelbanter.com/excel-programming/279388-problem-copying-header-footer.html)

Capt'n Roy

Problem Copying Header/Footer
 
Hi,
I am using Excel 2000. When I copy a Sheet and and paste it in another
sheet I do not get the header footer information.
How can I copy the header foooter information also or How can I set the
header/footer information to be used on all sheets in the book?

Any help will be greatly appreciated.

This is the marco I am having the user to run:

Sub AddSheet_Click()
'
' AddSheet_Click Macro
' Macro recorded 9/26/2003 by Sweetie Management LLC
'

'
' copy the template
'
Sheets("Template").Select
Cells.Select
Selection.Copy
'
' add a new sheet
'
Sheets.Add
ActiveSheet.Select

'
' paste the template to the new Sheet
'
Cells.Select
ActiveSheet.Paste

'
' rename sheet
'
MsgBox "Please rename this new sheet." & vbCrLf & _
"Right Click the new sheet tab." & vbCrLf & _
"Then choose RENAME."

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

End Sub


--
Capt'n Roy

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

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



Tom Ogilvy

Problem Copying Header/Footer
 
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


--
Regards,
Tom Ogilvy

Capt'n Roy wrote in message
...
Hi,
I am using Excel 2000. When I copy a Sheet and and paste it in

another
sheet I do not get the header footer information.
How can I copy the header foooter information also or How can I set the
header/footer information to be used on all sheets in the book?

Any help will be greatly appreciated.

This is the marco I am having the user to run:

Sub AddSheet_Click()
'
' AddSheet_Click Macro
' Macro recorded 9/26/2003 by Sweetie Management LLC
'

'
' copy the template
'
Sheets("Template").Select
Cells.Select
Selection.Copy
'
' add a new sheet
'
Sheets.Add
ActiveSheet.Select

'
' paste the template to the new Sheet
'
Cells.Select
ActiveSheet.Paste

'
' rename sheet
'
MsgBox "Please rename this new sheet." & vbCrLf & _
"Right Click the new sheet tab." & vbCrLf & _
"Then choose RENAME."

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

End Sub


--
Capt'n Roy

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

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






All times are GMT +1. The time now is 02:06 PM.

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