Results 1 to 6 of 6
  1. #1
    Lounger
    Join Date
    Feb 2004
    Location
    Hatboro, Pennsylvania, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Custom userform checkbox won't always work (xl97 xl2000)

    This problem occurs on some of my Excel VBA custom dialogs/userforms, whether run on xl97 or xl2000:

    Some checkboxes, linked to worksheet true/false cells, always work flawlessly when clicked on to change states.
    Others on the same userform work intermittently or practically not at all. The checkbox will "grey" when the mouse-button is held, but remain in the same state. Sometimes one of these (there may be several obstinate checkboxes on the form) WILL change state once, then go back to being unwilling to change again.

    The worksheet cells to which the checkboxes are linked (each one having its own rangename for reference) all appear to have the same characteristics, including being unlocked and unprotected.

    Ever see this problem? Or have any idea how to cure it?

    ~~~TIA from a first-time poster

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Custom userform checkbox won't always work (xl97 xl2000)

    What other code is running? Is there code which is resetting the objects or not allowing them to be changed. I speculate it is more a coding issue than a bug in excel.

    Steve

  3. #3
    Lounger
    Join Date
    Feb 2004
    Location
    Hatboro, Pennsylvania, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom userform checkbox won't always work (xl97 xl2000)

    I don't know that there is any other code running within Excel when this problem shows up, Steve. There HAVE been issues concerning apparent inadequate memory capacity within Excel in some of the applications in question; applications where we are endeavoring to crunch and plot sizeable amounts of engineering/scientific data, and on occassion run out of memory capacity in the process. Restarting Excel, and sometimes rebooting Windows (whether win98 or win2000) , clears that problem (for a while, at least). The same restart approach often makes those "sticky" checkboxes work better for a while. I'm still puzzled why, -- for instance -- of two checkboxes, one always works OK and the other gives problems, when the two of them are -- as best I can tell -- identically set up and linked to cells.

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Custom userform checkbox won't always work (xl97 xl2000)

    If you have userforms you must have code. Waht type of code is run when the userform loads, does it set things up and cause this problem?

    Steve

  5. #5
    Lounger
    Join Date
    Feb 2004
    Location
    Hatboro, Pennsylvania, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom userform checkbox won't always work (xl97 xl2000)

    SOLVED! There WAS an event-triggered sub that was supposed to trip when certain checkboxes were changed, but the Event-triggering was Disabled. ~~thanks

  6. #6
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom userform checkbox won't always work (xl97 xl2000)

    As a side remark, I tend NOT to link controls on userforms to worksheet cells, but to handle their content in code entirely.

    I have no real good reason to do this, except that it makes the forms more or less self contained: one can copy them into a fresh workbook without worrying about having to have the proper worksheets and cells linked again.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •