The event-handler procedure for the SelectionChange event
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) If Union(Target, Range("ToolbarRange")).Address = Range("ToolbarRange").Address Then
CommandBars("myBar").Visible = True
Else
CommandBars("myBar").Visible = False End If End Sub