Results 1 to 2 of 2
  1. #1
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    can't disable events (Excel97/2000, SR2)

    I notice that Application.EnableEvents = False does not always work to prevent events from firing. Is there some rule I'm not aware of that says when this is ignored?
    <pre>Application.EnableEvents = False
    lstQuarters.Selected(0) = True
    Application.EnableEvents = True
    </pre>

    This code doesn't work to prevent the _Click() event of the list box named lstQuarters from being fired when its first item is selected. Is there some way around this?

    Deb <img src=/S/yikes.gif border=0 alt=yikes width=15 height=15>

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: can't disable events (Excel97/2000, SR2)

    Excels application events do not extend to userforms or worksheet activeX controls. You could use <pre> Sheet1.lstQuarters.Enabled = False </pre>

    to disable a control named lstQuarters on Sheet1, and to reset just set the property to true.

    Andrew C

Posting Permissions

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