Results 1 to 7 of 7

Macro that executes upon Open

Threaded View

  1. #1
    Registered User
    Join Date
    08-14-2009
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003
    Posts
    6

    Macro that executes upon Open

    I have the code below that puts in the file name, date and time and page numbers. That works fine, however, I changed the name of this macro to AutoOpen thinking that this would execute upon opening an Excel doc -- I think this works for Word, that's why I tried it. Anyway, it doesn't execute upon opening an Excel doc. Can anyone tell me how to get that going? Also, the font of the file name comes at at 12 point while the other entries come in at 6 pt - any way of making these all consistent, say 8 pt? Thanks for your help.

    By the way, I'm a novice at Excel macros so being fundamental in your answer would be very helpful (i.e., don't know why there is a distinction between Regular Modules, Worksheet Modules and Workbook Modules. Seems to me I should always be creating Regular Module macaros so that they are accessible to all Excel docs but, again, I'm new at this so I'll have to read more about these items as well).
    Thanks in advance for your help.


    Sub AutoOpen()
    
     ActiveSheet.PageSetup.LeftFooter = "&F"
     ActiveSheet.PageSetup.RightFooter = "&8&H&X&D &T"
     ActiveSheet.PageSetup.RightHeader = "&8&H&XPage &P of &N"
    
    End Sub
    Last edited by jerem; 08-18-2009 at 11:03 PM. Reason: Put tags around code

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1