LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Help on VBA.

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"