I have a sub which loads a splash screen. very basic. For some reason the first time I load the workbook it doesnt fire. If I close it then open it it does. Then if I restart my comp and load it again it doesnt fire. Any ideas why?
Code:
Private Sub Workbook_Open()
'error 438 somewhere in here
On Error GoTo errHandler:
Dim ws As Worksheet
Application.ScreenUpdating = False
With wbBook
Application.ExecuteExcel4Macro "show.toolbar(""Ribbon"",False)"
End With
For Each ws In ActiveWorkbook.Worksheets
If InStr(ws.Name, "Dashboard") > 0 Then
ws.Visible = xlSheetVisible
Else: ws.Visible = False
End If
Next ws
With ActiveWindow
.DisplayVerticalScrollBar = False
.DisplayRuler = False
.DisplayGridlines = False
.DisplayHeadings = False
End With
With ThisWorkbook
Application.DisplayFormulaBar = False
End With
Application.Visible = False
SplashScreen.Show
Application.Visible = True
Application.ScreenUpdating = True
Exit Sub
errHandler::
MsgBox "An Error has Occurred " & vbCrLf & "The error number is: " _
& Err.Number & vbCrLf & Err.Description & vbCrLf & _
"Please notify the admin (with a screenshot of this error)"
Err.Clear
End Sub