Hide Custom Command Bar if Workbook opened Read-Only

  • Thread starter Thread starter MiataDiablo
  • Start date Start date
M

MiataDiablo

When I open my workbook read-only, the macro listed below runs. How
do I also have my custom command bar hide as well?

Sub ShowAffOnly()
Dim wsSheet As Worksheet
For Each wsSheet In Worksheets
If wsSheet.Name <> "Affiliation" Then wsSheet.Visible = xlVeryHidden
Next wsSheet
End Sub
 
Application.Commandbars("MyCustom").Visible = False

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Application.Commandbars("MyCustom").Visible = False

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)







- Show quoted text -

Thank you so much. I wish I would learn to quit making it harder than
it is.
 
Back
Top