Do your spreadsheets each have different headers/footers?
I assume your users need to change some things in the workbook? Because otherwise it would be too easy to just password protect the workbook.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
With ws.PageSetup
.LeftHeader = ActiveSheet.Range("A100").Value
.CenterHeader = ""
.RightHeader = ws.Name
.LeftFooter = ActiveWorkbook.Name
.CenterFooter = ""
.RightFooter = Date & " " & Time
End With
Next ws
End Sub
Great minds think alike, right?I'm actually using BeforePrint right now but was wondering whether there's any way to prevent the changes to begin with.
Thanks anyways KMSeattle.