+ Reply to Thread
Results 1 to 2 of 2

Checkbox crashing/locking up excel resources ONLY when used after another VBA routine

  1. #1
    Registered User
    Join Date
    03-12-2012
    Location
    London
    MS-Off Ver
    Office 365 ProPlus 64 bit
    Posts
    35

    Checkbox crashing/locking up excel resources ONLY when used after another VBA routine

    Hi All!

    Hoping for some clever people to help out. I'm a VBA novice, but trying my best.



    Context:
    I have a large excel tool, with a lot of VBA included. Performance isn't perfect, but it's completely workable. I'm running Office 365 ProPlus 64 bit, other users running 32bit are also having this problem.


    Problem:
    I have 5 form control checkboxes included on 1 sheet. As an example, 1 of them is assigned to the below VBA in a module;

    Please Login or Register  to view this content.

    If I click these checkboxes at any time they work perfectly UNLESS I have run 1 particular routine immediately before. Let's call that one RoutineA.

    RoutineA does a number of things including making an ADODB connection, downloading a record set & then a number of formatting changes on other sheets.

    If I've run RoutineA immediately before, then immediately click any of the checkboxes to run the checkbox VBA - excel locks up completely. The file doesn't crash in the standard excel sense (screen doesn't white out), the cursor does trail around but clicks are unresponsive everywhere. I can still close the file using the cross & it does give me the save dialogue box.

    If I've run any other piece of VBA between RoutineA & clicking the checkbox - the checkbox VBA runs fine on a cell click.


    I've tried:

    If I step into the checkbox VBA, rather than running off the checkbox mouse click then it steps through fine with no errors.

    If I continuously press ESC when excel is in this stage, the majority of the time I get no response/change in the state but once or twice I've get a pop up saying "The cell or chart you're trying to change is on a protected sheet" which makes me think the checkbox VBA is still running in the background & that's what is locking up excel.




    Questions:
    Is there something I should clean up after my RoutineA that could be causing conflicts with this checkbox VBA?

    Or is there something in this checkbox VBA which is bad practice & could be causing this?

    If possible, I really want to keep the checkboxes- I've seen some people complain about them causing performance issues & suggest alternative options of using cell clicks & windings to make it appear like it is a checkbox but that would require a re-design of the relevant tab & I'd really like to avoid if possible.


    Many thanks for any suggestions!
    Last edited by sharper1989; 11-30-2020 at 07:11 AM.

  2. #2
    Registered User
    Join Date
    03-12-2012
    Location
    London
    MS-Off Ver
    Office 365 ProPlus 64 bit
    Posts
    35

    Re: Checkbox crashing/locking up excel resources ONLY when used after another VBA routine

    RoutineA ends with showing a modeless UserForm which the user closes down manually using the cross.

    I've just realised there's a crossover there with form controls & UserForm - not sure if it's relevant or gives any more ideas.

+ 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. Replies: 1
    Last Post: 06-19-2017, 03:58 AM
  2. [SOLVED] Excel 2016 Sort routine issue - recording macro has sheet name in sort routine
    By pongmeister in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-05-2016, 02:45 PM
  3. Excel crashing when trying to view code before macro run; not crashing after first run
    By goonerforlyf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2015, 05:27 PM
  4. Locking cells with a checkbox using a macro.
    By SplatterKat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-19-2015, 05:31 PM
  5. [SOLVED] CheckBox Sub Routine??????
    By eptownie1988 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2014, 11:36 AM
  6. Help with macro, automatical locking cells when excel is closed but only locking 1 sh
    By snoopy1461 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2011, 11:29 AM
  7. Checkbox locking out other Checkboxes
    By Rich Kniatt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-27-2005, 05:34 PM

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