I have a form in visual basic that has four tabs. I have different command buttons on each tab that does different things.
I need to reuse few buttons in all of the tab, how can I reuse it.
Thanks
Dali
Printable View
I have a form in visual basic that has four tabs. I have different command buttons on each tab that does different things.
I need to reuse few buttons in all of the tab, how can I reuse it.
Thanks
Dali
What doyou mean by reuse? Like if you click it, you can click it again later?
For the buttons that you want to use, take them off the tabs, and put them on the form itself. Then, depending on which tab is active, the button will do different things. Example:VB Code:
Private Sub Command1_Click() 'this is only an example. you can have the button run different 'sub routines instead of displaying a message box Select Case SSTab1.Tab Case 0 MsgBox "You are on the first tab" Case 1 MsgBox "You are on the second tab" Case 2 MsgBox "You are on the third tab" End Select End Sub