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..

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

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

Thankx

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..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.