M
mario
I am using Excel 2000
I want to print the following information in the footer:
1. File path, File name and worksheet name
2. Print Date and time in the print out
3. Last Saved by user "xyz"
4. Last saved time
5. Page numer
I am currently using the following VBA code in my file:
VBAProject(mario.xls) > Microsoft Excel Objects >
ThisWorkBook
----------------------------------------------------------
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = "&8" & _
LCase(ActiveWorkbook.FullName) & "; Worksheet:"
& " &A " & _
vbCrLf & "Printed on:" & Format(Now(), "dd-mmm-
yyyy")
.RightFooter = "&8" & "Page &P of &N"
End With
End Sub
----------------------------------------------------------
Please help me with
1. How to go to the next line in footer after printing
the file name & path. "vbcrlf" actually introduces an
empty line and then prints on the second line., which I
dont want
2. What will be the VBA code for Printing the date in the
format like 19 Sept 2003, 13:30
3. What will be the VBA code to print the "Last Saved By"
and "Last Saved time"
Please help.
Thanks
I want to print the following information in the footer:
1. File path, File name and worksheet name
2. Print Date and time in the print out
3. Last Saved by user "xyz"
4. Last saved time
5. Page numer
I am currently using the following VBA code in my file:
VBAProject(mario.xls) > Microsoft Excel Objects >
ThisWorkBook
----------------------------------------------------------
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = "&8" & _
LCase(ActiveWorkbook.FullName) & "; Worksheet:"
& " &A " & _
vbCrLf & "Printed on:" & Format(Now(), "dd-mmm-
yyyy")
.RightFooter = "&8" & "Page &P of &N"
End With
End Sub
----------------------------------------------------------
Please help me with
1. How to go to the next line in footer after printing
the file name & path. "vbcrlf" actually introduces an
empty line and then prints on the second line., which I
dont want
2. What will be the VBA code for Printing the date in the
format like 19 Sept 2003, 13:30
3. What will be the VBA code to print the "Last Saved By"
and "Last Saved time"
Please help.
Thanks