V
vicky
This code works fine . But the problem is i want to apply to only one
specific workbook . i.e this code it De-activates the Sheet menu bar
in all the excel files i open .....
How to de-activate Menu bar in only one Excel Workbook ????????/ Say i
want to Deactivate the Sheet toolbar in only Test.xls Workbook .
Private Sub Workbook_Open()
'Application.CommandBars.FindControl(ID:=30026).Enabled = True
Dim Ctl As CommandBarControl
On Error Resume Next
For Each Ctl In Application.CommandBars.FindControl
(ID:=30026).Controls
Ctl.Enabled = False
Next Ctl
Application.CommandBars.FindControl(ID:=30006).Enabled = True
On Error GoTo 0
End Sub
specific workbook . i.e this code it De-activates the Sheet menu bar
in all the excel files i open .....
How to de-activate Menu bar in only one Excel Workbook ????????/ Say i
want to Deactivate the Sheet toolbar in only Test.xls Workbook .
Private Sub Workbook_Open()
'Application.CommandBars.FindControl(ID:=30026).Enabled = True
Dim Ctl As CommandBarControl
On Error Resume Next
For Each Ctl In Application.CommandBars.FindControl
(ID:=30026).Controls
Ctl.Enabled = False
Next Ctl
Application.CommandBars.FindControl(ID:=30006).Enabled = True
On Error GoTo 0
End Sub