Add a few event procedures to the ThisWorkbook module of the workbook that
launches the toolbar:
Private Sub Workbook_Activate()
CommandBars("My Toolbar").Visible = True
End Sub
Private Sub Workbook_Deactivate()
CommandBars("My Toolbar").Visible = False
End Sub
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
CommandBars("My Toolbar").Visible = (Sh.Name = MySheet.Name)
End Sub
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______
"Darin Kramer" <(E-Mail Removed)> wrote in message
news:%23sEi%(E-Mail Removed)...
>
>
> Hi There,
>
> I have some VB that creates a Command bar (toolbar) and populates it
> with buttons which I assign macros too.
>
> I would like to have the toolbar close when any other sheet is selected
> (It is launched from say sheet x, and if you click sheet y I want the
> toolbar to dissapear (well close!)
>
> Regards
>
> Darin
>
> *** Sent via Developersdex http://www.developersdex.com ***