+ Reply to Thread
Results 1 to 3 of 3

How to make macro start when file is opened

  1. #1
    gifer
    Guest

    How to make macro start when file is opened

    I want a macro to start running when I open the file, how and where do I use
    an event procedure like workbook_open (if this is a real one??) to do this?
    Excel2000.

    Thanks,

    John



  2. #2
    Bob Phillips
    Guest

    Re: How to make macro start when file is opened

    John,

    You've got it.

    Private Sub Workbook_Open()
    'your code here
    End Sub

    'This is workbook event code.
    'To input this code, right click on the Excel icon on the worksheet
    '(or next to the File menu if you maximise your workbooks),
    'select View Code from the menu, and paste the code



    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "gifer" <jlo2day-groups@yahoo.com> wrote in message
    news:1oadnchAycRwarDfRVn-gg@comcast.com...
    > I want a macro to start running when I open the file, how and where do I

    use
    > an event procedure like workbook_open (if this is a real one??) to do

    this?
    > Excel2000.
    >
    > Thanks,
    >
    > John
    >
    >




  3. #3
    Bill Kuunders
    Guest

    Re: How to make macro start when file is opened

    Go to VBA editor using <alt> + <f11>

    In the "project - vba project window" double click on "this workbook"
    On the right side of the window click on dropdown arrow next to "general"
    select "workbook"
    click on dropdown next to "open" to see all possible event options
    select "open" or any of the others
    enter the name of the macro you want to run without the Sub and without the
    ( )

    So it should look like...........

    Private Sub Workbook_Open()
    macroname
    End Sub


    Regards
    Bill K

    "gifer" <jlo2day-groups@yahoo.com> wrote in message
    news:1oadnchAycRwarDfRVn-gg@comcast.com...
    >I want a macro to start running when I open the file, how and where do I
    >use an event procedure like workbook_open (if this is a real one??) to do
    >this? Excel2000.
    >
    > Thanks,
    >
    > John
    >




+ Reply to Thread

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