0

hii..i have a toolbar which i hav designed in a form..the problem is thatthe code isnt working...i have used screen.activeform in a select case..i think isnt fully correct..plz do help me out..

4
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by jhai_salvador
0

In design view, double click on the toolbar so it will open up to its default event in the code window... From there you use the arguements passed to this event to determine which button was clicked...

Good Luck

0

Hi kavya,
If you think your code has some problem then why dont you paste your code. Someone might correct your code.

Thankx

0

Heres a sample...

I have created 3 buttons for my toolbar...
The event is Toolbar1_ButtonClick...

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)

Select Case Button.Index 
    Case 1 'This is the first button
        'Your code goes here....
        'Do somthing here...
        '

    Case 2 'This is my second button
        'Your code goes here....
        'Do somthing here...
        '

    Case 3 'This is my third button..
        'Your code goes here....
        'Do somthing here...
        '

End Select

End Sub

Thats it... Hope this will solve your problem..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.