Macros
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Macros

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Hey all, is there a way to make it so when you open an excel spreadsheet, the first thing it does is run a macro?

    Thanks

    -Lewis

    lewis@lewisystems.net

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sure, put it in the Workbook_Open event.
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  3. #3
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try this:

    sub auto_open
    application.run("Your Macro Name")
    end sub

    Don't include the "sub".

    FYI, workbook_open goes into the "ThisWorkbook" module. The code above goes into any old normal module.

    Hope this helps. Cheers,

    Nate

    [ This Message was edited by: NateO on 2002-03-11 17:02 ]

  4. #4
    New Member
    Join Date
    Mar 2002
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Where do I find the Workbook_Open event???


  5. #5
    MrExcel MVP Russell Hauf's Avatar
    Join Date
    Feb 2002
    Location
    Portland, OR Area - USA
    Posts
    1,605
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    On 2002-03-11 17:36, curator wrote:
    Where do I find the Workbook_Open event???

    See the last post on this link (by Anonymous):

    http://mrexcel.com/board/viewtopic.p...1960&forum=2&4

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com