+ Reply to Thread
Results 1 to 9 of 9

Infinite loop in a workbook open event

  1. #1
    Registered User
    Join Date
    01-18-2024
    Location
    Brazil
    MS-Off Ver
    2013
    Posts
    24

    Infinite loop in a workbook open event

    Yeah, it happened
    The workbook file simply stops and crashes. Cannot access the VB editor.
    I searched a solution in some places but the only I found is to hold the shift key while opening the workbook file but it didn't work in my excel 2010.

    If someone can help........Thanks!

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,382

    Re: Infinite loop in a workbook open event

    Have you tried holding control while opening to open Excel in safe mode (which should block all vba macros from running)? https://support.microsoft.com/en-us/...3-528af4f7ac72
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    423

    Re: Infinite loop in a workbook open event

    If you open Excel and disable events first before opening your spreadsheet, that should do it.

  4. #4
    Registered User
    Join Date
    01-18-2024
    Location
    Brazil
    MS-Off Ver
    2013
    Posts
    24

    Re: Infinite loop in a workbook open event

    After. Hours pressing the control key. It finally worked once.

    The tip is not open the file directly. open the excel shortcut application first, and then open the file in the recent tab.

  5. #5
    Registered User
    Join Date
    01-18-2024
    Location
    Brazil
    MS-Off Ver
    2013
    Posts
    24

    Re: Infinite loop in a workbook open event

    Quote Originally Posted by MrShorty View Post
    Have you tried holding control while opening to open Excel in safe mode (which should block all vba macros from running)? https://support.microsoft.com/en-us/...3-528af4f7ac72
    After. Hours pressing the control key. It finally worked once.

    The tip is not open the file directly. open the excel shortcut application first, and then open the file in the recent tab.

  6. #6
    Registered User
    Join Date
    01-18-2024
    Location
    Brazil
    MS-Off Ver
    2013
    Posts
    24

    Re: Infinite loop in a workbook open event

    Quote Originally Posted by mgs73 View Post
    If you open Excel and disable events first before opening your spreadsheet, that should do it.
    It only worked with the file that you are opening. I think there is no way to disable macros to all workbooks.

  7. #7
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    423

    Re: Infinite loop in a workbook open event

    It only worked with the file that you are opening. I think there is no way to disable macros to all workbooks.
    It doesn't disable macros, only event-driven ones, such as Workbook_Open
    Please Login or Register  to view this content.
    disables events for everything open in Excel until you set it back to True (or restart Excel).

  8. #8
    Registered User
    Join Date
    01-18-2024
    Location
    Brazil
    MS-Off Ver
    2013
    Posts
    24

    Re: Infinite loop in a workbook open event

    Quote Originally Posted by mgs73 View Post
    It doesn't disable macros, only event-driven ones, such as Workbook_Open
    Please Login or Register  to view this content.
    disables events for everything open in Excel until you set it back to True (or restart Excel).
    But where do I put this command?

    The workbook events only work for the particular workbook, I guess

  9. #9
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    423

    Re: Infinite loop in a workbook open event

    But where do I put this command?
    You can just type it into the Immediate Window (View - Immediate Window).

+ 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. Workbook Open event - userform gets displayed over another workbook
    By hemantparmar in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-18-2019, 11:56 AM
  2. Workbook Open Event
    By cameron213 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2013, 03:55 AM
  3. WorkBook open Event
    By zplugger in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-30-2011, 06:02 PM
  4. WorkBook Open Event?
    By zplugger in forum Excel General
    Replies: 7
    Last Post: 12-10-2011, 02:28 AM
  5. Open workbook event
    By pmguerra in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-24-2010, 09:31 AM
  6. Open Workbook Event
    By newbie13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2008, 11:56 AM
  7. Workbook open event
    By hans.domian@de.man-mn.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-11-2006, 06:00 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