View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] MiataDiablo@gmail.com is offline
external usenet poster
 
Posts: 31
Default Hide Custom Command Bar if Workbook opened Read-Only

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