thanks a lot . i just need to de - activate the sheet option in format
menu bar . this line de-activates whole format menu bar
Application.CommandBars.FindControl(ID:=30026).Enabled = True
On Error Resume Next
For Each Ctl In Application.CommandBars.FindControl(ID:=30006).Controls
Ctl.Enabled = False
Next Ctl
Application.CommandBars.FindControl(ID:=30026).Enabled = True
On Error GoTo 0
End Sub
Sub Enabled_True()
Dim Ctl As CommandBarControl
On Error Resume Next
For Each Ctl In Application.CommandBars.FindControl(ID:=30006).Controls
Ctl.Enabled = True
Next Ctl
On Error GoTo 0
End Sub
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.