+ Reply to Thread
Results 1 to 3 of 3

Disable on open event

  1. #1
    Registered User
    Join Date
    12-13-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    78

    Disable on open event

    I have a workbook that the on open event opens a form. This works great. This form is only needed the first time the workbook is opened. I have a macro that runs the following save as code
    Please Login or Register  to view this content.
    This saves the workbook just like I want. The issue is on the "new" workbook I do not want the form to open, on open (it is not needed) I tried this code at the end of my save as event trying to disable the On Open Event. Did not work.

    any ideas?

    Please Login or Register  to view this content.
    Last edited by PLD60; 02-01-2017 at 06:03 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Disable on open event

    One way would be to save the new file as a .xlsx file so there would be no code preserved in the file at all.

    Another way is to pick a cell somewhere the workbook and only open the form if that cell is empty. Place a value into that cell and then saveas, that workbook would then suppress reopening the form due to that checkcell being filled.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-13-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: Disable on open event

    JBeaucaire, using the value in a cell worked great.

+ 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. Disable Workbook Open Event Until Other Code has finished Executing
    By dgdgdg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2013, 05:36 AM
  2. Disable Worksheet_Change event while looping
    By thomasrawley in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-06-2006, 06:31 PM
  3. Disable SelectionChange Event
    By BillCPA in forum Excel General
    Replies: 2
    Last Post: 02-17-2006, 02:50 PM
  4. Disable Click event
    By Ashman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2005, 03:05 PM
  5. Disable event macro while Auto_open() run
    By Sunil Patel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2005, 02:05 PM
  6. HOW TO DISABLE ALL MACROS in BeforeClose event handling procedure
    By Intellihome in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-14-2005, 11:05 AM
  7. [SOLVED] Disable saving in BeforeClose event
    By Franck in forum Excel General
    Replies: 2
    Last Post: 04-15-2005, 05:06 AM
  8. Remove/disable event macros in SavedAs wkbk?
    By Ed in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-22-2005, 10:06 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