Hello all. I'm new to the world of macros so I don't understand anything and I need help, Thank You.
I want to run my macro automatically when excel is opened, so I used Workbook_Open to solve it. But the problem is my macros just work for 1 out of 5 sheets. What I want is my macros will work 3 out of 5 sheets. Any help is greatly appreciated Thank You
Here are my macros
Sub Workbook_Open()
Dim sh As Worksheet
Set sh = Array("Sheet1", "Sheet2","Sheet3").Select
sh.Protect "123456", UserInterfaceOnly:=True
sh.EnableOutlining = True
End Sub
I want to run my macro automatically when excel is opened, so I used Workbook_Open to solve it. But the problem is my macros just work for 1 out of 5 sheets. What I want is my macros will work 3 out of 5 sheets. Any help is greatly appreciated Thank You
Here are my macros
Sub Workbook_Open()
Dim sh As Worksheet
Set sh = Array("Sheet1", "Sheet2","Sheet3").Select
sh.Protect "123456", UserInterfaceOnly:=True
sh.EnableOutlining = True
End Sub