+ Reply to Thread
Results 1 to 8 of 8

Sub Auto_Open not Auto_Opening

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Sub Auto_Open not Auto_Opening

    I used to know how to do this and now I've forgotten again. I've pasted this code into the "ThisWorkbook" section. What else do I need to do to ensure that the code will automatically run when I open the file??

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Sub Auto_Open not Auto_Opening

    Do you mean this?

    Please Login or Register  to view this content.
    Last edited by stnkynts; 04-05-2013 at 10:36 AM.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Sub Auto_Open not Auto_Opening

    the Auto_open routine needs to be in a standard module.

    But as stnkynts says, you can use the Workbook_Open event of the Thisworkbook object
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Sub Auto_Open not Auto_Opening

    Thanks Guys! I got my macro to run!!. Do you know how to make a change event Sub? I used to have the code, but have since lost it. Sub Change_Event() ?????

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Sub Auto_Open not Auto_Opening

    The events for a worksheet/thisworkbook object can be generated by selecting the correct Object and Procedure from the drop down list in VBE.

    right click sheet tab and view code to get to vbe.

  6. #6
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Sub Auto_Open not Auto_Opening

    What drop down list are you referring to? The one that comes up when writing code? Can you give an example of a change event sub?

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Sub Auto_Open not Auto_Opening

    vbe.jpg

    The 2 drop downs at the top of the code window

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Sub Auto_Open not Auto_Opening

    That's awesome! I've never played with those dropdowns.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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