charlie_580
Board Regular
- Joined
- Feb 3, 2007
- Messages
- 56
I'm trying to get a footer to update when a workbook is opened. there are 4 sheets in the workbook but the only the sheet which was last saved on updates when it's opened.
Ideally it would update each sheet on print but my code isn't working.
I have a very limited knowledge of VBA.
Here is what I have
Private Sub Workbook_Open()
' Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = "Printed by " & Application.UserName & " on " & Date
End With
End Sub
Any help much appreciated.
Ideally it would update each sheet on print but my code isn't working.
I have a very limited knowledge of VBA.
Here is what I have
Private Sub Workbook_Open()
' Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = "Printed by " & Application.UserName & " on " & Date
End With
End Sub
Any help much appreciated.