Option Explicit
Private Sub Workbook_Open()
Dim strFooter As String
if me.path = "" then 'it's never been saved, so it's a template
strFooter = InputBox("Please enter the footer:")
Sheets("your worksheet name").PageSetup.CenterFooter = strFooter
end if
End Sub
(I moved the strFooter to inside the procedure. From your snippet, it looked
like it was local to that procedure.)
"gavmer <" wrote:
Hi all,
I have another problem unfortunately. This code is listed within a
template:
Option Explicit
Public strFooter As String
Private Sub Workbook_Open()
strFooter = InputBox("Please enter the footer:")
Sheets("your worksheet name").PageSetup.CenterFooter = strFooter
End Sub
I would like for this to apply only when the template is opened and not
when the saved workbook is opened. problem is the footer is a reference
and when a user opens the workbook, the original reference from the
template can be altered.
Any ideas???
---
Message posted from http://www.ExcelForum.com/
--
Dave Peterson