× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



db, reading quickly, I hope I address your question. Sounds as if you need all worksheets modified. Note that your source uses ActiveSheet. You might want to try

Dim eachSheet as Worksheet

 For Each eachSheet In Application.Worksheets

   With eachSheet.PageSetup
      .CenterHeader =
         BuiltinDocumentProperties("Title").Value
      .RightFooter = "Last Updated: "
         & BuiltinDocumentProperties("Last Save Time").Value
      .LeftFooter = ThisWorkbook.FullName
   End With

Next eachSheet

About security, go to the Tools menu, Options item, Security tab, and look for a button labeled Macro Security. You can shut it off completely here. Do this only if you know where all your spreadsheets come from.

HTH
Vern

At 08:49 AM 8/30/2004, you wrote:
OK, this is working pretty well:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
  ActiveSheet.PageSetup.CenterHeader =
    BuiltinDocumentProperties("Title").Value
  ActiveSheet.PageSetup.RightFooter = "Last Updated: "
    & BuiltinDocumentProperties("Last Save Time").Value
  ActiveSheet.PageSetup.LeftFooter = ThisWorkbook.FullName
End Sub

I am still buggered by the macro warning, but I haven't had time to check
out Walden's suggestion of digital/self signing thoroughly.  I tinkered with
the idea of creating an add-in, as Excel suggests might avoid the warning,
but again, no time to look into it yet.

This morning, I opened an existing .xls with this Workbook_BeforePrint setup
working and printed on Friday, did a Save As to a new name, and edited the
worksheet.  I had done this several times last week, and the
Workbook_BeforePrint functioned as expected.  Today, though, I copied
several sheets within the same .XLS.  I saved the workbook, then printed the
"entire workbook" so that all the sheets would print together.  The
Workbook_BeforePrint only updated the last sheet printed which, FWIW, was
the active sheet at the time of printing.  All of the other sheets had the
information from the .xls that I opened before doing the Save As.

I noticed that there is also Workbook_BeforeSave.  It seems that these
functions need to run _AfterSave, but I don't see that one in the list of
"subs".  Maybe SheetActivate?

Suggestions / advice are greatly appreciated!

db


-- This is the PC Technical Discussion for iSeries Users (PcTech) mailing list To post a message email: PcTech@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/pctech or email: PcTech-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/pctech.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.