![]() |
sub to create a sub
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 |
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 |
All times are GMT +1. The time now is 01:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com