Proper way to fire events
Prep for a pre-employment Excel test with Job Test Prep
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Proper way to fire events

  1. #1
    Guest

    Default

     
    Hi,
    I have a ListBox1 that responds to a click event by running function ListBox1_Click().

    I have a CommandButton1 that responds to a click event by running function CommandButton1_Click()

    I want, by clicking CommandButton1, a Click event for ListBox1 to be fired. Did this..

    Sub CommandButton1_Click()
    ListBox1_Click
    End Sub

    kinda works.. but Excel's displaying the sheets all wrong now.. ie its not cleared
    Tried RaiseEvent, but that does not work

    Question: How do I correctly fire an event?

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    I have no real idea of what your problems are as you haven't really told us, other than "Excel's displaying the sheets all wrong "

    Try setting the TakeFocus******* property for the CommandButton to False.



    _________________
    Kind Regards
    Dave Hawley
    OzGrid Business Applications
    Microsoft Excel/VBA Training


    [ This Message was edited by: Dave Hawley on 2002-03-12 19:56 ]

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com