Hide Custom Command Bar if Workbook opened Read-Only

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
 
B

Bob Phillips

Application.Commandbars("MyCustom").Visible = False

--
HTH

Bob

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

MiataDiablo

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.
 

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.

Ask a Question

Top