Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can Page Setup values be controlled with VBA?
My Network Administrator where I work asked me if I could put the date that
a worksheet was last changed in the footer of a printout. I don't work with print settings with VBA at all, so I'm a little unsure here. Similarly, can this be done in MS Word? TIA -gk- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can Page Setup values be controlled with VBA?
Using Excel
Put this code in the Thisworkbook code module Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet .PageSetup.RightFooter = "Document last saved on " & _ Format(ActiveWorkbook.BuiltinDocumentProperties("L ast Save Time"), _ "dd mmm yyyy") End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "TBA" wrote in message ... My Network Administrator where I work asked me if I could put the date that a worksheet was last changed in the footer of a printout. I don't work with print settings with VBA at all, so I'm a little unsure here. Similarly, can this be done in MS Word? TIA -gk- |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can Page Setup values be controlled with VBA?
Beautiful! Thanks Bob!
-gk- "Bob Phillips" wrote in message ... Using Excel Put this code in the Thisworkbook code module Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet .PageSetup.RightFooter = "Document last saved on " & _ Format(ActiveWorkbook.BuiltinDocumentProperties("L ast Save Time"), _ "dd mmm yyyy") End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "TBA" wrote in message ... My Network Administrator where I work asked me if I could put the date that a worksheet was last changed in the footer of a printout. I don't work with print settings with VBA at all, so I'm a little unsure here. Similarly, can this be done in MS Word? TIA -gk- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Page layout - page setup - items disabled | Excel Discussion (Misc queries) | |||
FORMAT EXCEL WORKBOOK (PAGE SETUP) ALL AT ONCE INSTEAD OF BY PAGE | Excel Discussion (Misc queries) | |||
Page Setup when saving a worksheet as a web page | Excel Discussion (Misc queries) | |||
HOW DO I SETUP A PAGE IN EXCEL TO GIVE TOTALS TO ANOTHER PAGE | Excel Worksheet Functions | |||
Under Page Setup the page option of Ledger - for Office XP | Excel Discussion (Misc queries) |