I have multiple worksheets protected with password and has group columns . I have following code but not working, I dont know what is wrong, please help. Thanks
Private Sub Workbook_Open()
' Dim ws As Worksheet
'
' For Each ws In Worksheets
'
' Select Case UCase(ws.Name)
' Case "7", "9"
' With ws
' .Protect Password:="Test", UserInterfaceOnly:=True
' .EnableOutlining = True
' End With
' Case Else
' End Select
'
' Next ws
'
'End Sub
Private Sub Workbook_Open()
' Dim ws As Worksheet
'
' For Each ws In Worksheets
'
' Select Case UCase(ws.Name)
' Case "7", "9"
' With ws
' .Protect Password:="Test", UserInterfaceOnly:=True
' .EnableOutlining = True
' End With
' Case Else
' End Select
'
' Next ws
'
'End Sub