View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default 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-