This sub routine CANNOT be renamed because it is triggered on the workbook opening. How do I compile in VBA compiler? What do I paste into the compiler window & what do I put back into the VBA editor in my original spreadsheet before compiling the exe?
Private Sub Workbook_Open()
For Each wsSht In Workbooks(“Local Book 1.xlsm”).Worksheets
If Not wsSht.Name = “Simon” Then wsSht.Visible = xlSheetVeryHidden
ThisWorkbook.Protect “password”, True