+ Reply to Thread
Results 1 to 3 of 3

Macro starting running on workbook open, not on option button selection

  1. #1
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    17

    Macro starting running on workbook open, not on option button selection

    I have a workbook for purchase orders and getting quotes from vendors. I have a macro that pulls a sequential Purchase Order number if the user form is created to use a purchase order. It was working perfectly, the QPO userform opens up when people open the file and a purchase order number only appears if a user selects the purchase order option button. However, I was trying to clean up some old code, and I must've deleted or changed the code so that the PONumb macro runs every time the file is opened.

    I have attached the code for the macro to pull the sequential number from a text file, the command that is supposed to make the auto_open work only when the option button is selected and I have also attached the file. It did work the way it was supposed to for awhile.

    Please help,
    Grant
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,277

    Re: Macro starting running on workbook open, not on option button selection

    You use the workbook open event, so it is safe to rename the Auto_Open routine. Use Find and Replace for the entire project, and replace

    Auto_Open

    with

    Not_Auto_Open

    You should find two instances - once you do that, you should be fine.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Macro starting running on workbook open, not on option button selection

    Thank you, worked like a champ!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA help password check then open form or sheet depending on option button selection
    By pjbassdc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2013, 06:35 AM
  2. [SOLVED] UserForm Option Button selection to determine which macro to run.
    By strud in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2013, 08:53 AM
  3. Replies: 0
    Last Post: 07-18-2012, 09:45 AM
  4. Running macro on open of workbook?
    By Lime in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-14-2006, 01:45 PM
  5. [SOLVED] macro not running on workbook open
    By Nick Smith in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-11-2006, 05:30 AM

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