Hi
I have the following code on my workbook
this works on excel 2013 and office 365 but when used on an earlier version of excel it creates a run time error on opening the worksheet
Anyone got any insight as to why as I need it to work on earlier versions of excel as not all my team have the newer version of excel
thanks
I have the following code on my workbook
Code:
Private Sub Workbook_Open()
Dim objSheet As Object
For i = 1 To ThisWorkbook.Sheets.Count Step 1
Set objSheet = ThisWorkbook.Sheets(i)
If ((objSheet.Visible = True) And (objSheet.Name <> "Start" And objSheet.Name <> "About" And objSheet.Name <> "Medical Provider")) Then
objSheet.Visible = False
End If
Next
Sheets("Start").Activate
End Sub
this works on excel 2013 and office 365 but when used on an earlier version of excel it creates a run time error on opening the worksheet
Anyone got any insight as to why as I need it to work on earlier versions of excel as not all my team have the newer version of excel
thanks
Last edited by a moderator: