• click event not firing (Excel 2003 XP)

    Author
    Topic
    #451759

    Hi everybody:

    This is weird. I have a spreadsheet with 3 controls on it: a command button, a checkbox, and a combo box.
    The user makes a selection from the combo box, which fires a routine on its lost focus event. I am using that event in place of the Change event, because I only want the code to run once. Then, the user checks (or doesn’t ) the check box and clicks the button, which calls another routine on its click event that creates a pivot table report.

    Or used to, until today! As of this morning (Monday, Monday!) the click event does not fire. The combo lost focus code runs fine when the user clicks the button, but the button code doesn’t run. It’s not the code; the button won’t even give me a “click” message box.

    Anyone ever experienced anything similar? Any ideas how to work around it? I’m wondering what could cause this peculiar behavior; activating another sheet?
    I don’t want to call the click event procedure at the end of the lostfocus code, because the user may not actually elect to run the pivot report at that point.

    Thank you, in advance, for your help.

    Viewing 0 reply threads
    Author
    Replies
    • #1112955

      What happens if you double-click the command button while in design mode? Does that take you to the On Click event procedure?

      • #1112971

        Hi Hans:

        No, I tried that. Same problem.

        I figured it out – the lostfocus routine activated another worksheet, and that appears to have confused Excel into disregarding the click event from the button on the first sheet. I rewrote my lostfocus code to avoid activating the second worksheet, and now the click event is firing fine.

        What I don’t understand is why this wasn’t a problem last week.

        Thanks for your help.

    Viewing 0 reply threads
    Reply To: click event not firing (Excel 2003 XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: