View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default sub to create a sub

Take a look at the way John Walkenbach implemented a similar routine:

http://j-walk.com/ss/excel/files/addpath.htm

(The code is unprotected.)

Andrew wrote:

Frank - thank you for your previous reply.

What I'd like to do now is create a sub that I can place
in my user's Personal workbook that will copy the code
below into the active workbook (so they can add this code
to any workbook they wish):

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In Me.Worksheets
With wkSht.PageSetup
.CenterFooter = Format _
(ActiveWorkbook.BuiltinDocumentProperties _
("Last save time"),"DD.MM.YYYY")
End With
Next wkSht
End Sub


Thanks again!!

Andrew


--

Dave Peterson