use the BeforePrint event to add information to a header or footer before the sheet is printed
Private Sub Workbook_BeforePrint(Cancel As Boolean) ActiveSheet.PageSetup.RightFooter = ActiveWorkbook.FullName End Sub