Hi all,
I have made a workbook whereby as soon as I open the workbook, it will display the Home tab and open my splash screen "welcome". Whilst my splash screen is open, excel will calculate all formulae then close the splash screen. However, this only works provided I do not click the splash screen. If I click anywhere on the splash screen, excel will stop calculating and the splash screen disappears.
Could anyone please advise how to fix this.
Please see my codes -
Workbook Code
Private Sub Workbook_Open()
Worksheets("Home").Activate
Welcome.Show
End Sub
Form Code
Private Sub UserForm_Activate()
Application.OnTime Now, "KillTheForm"
End Sub
Private Sub UserForm_QueryClose _
(Cancel As Integer, CloseMode As Integer)
' Prevents use of the Close button
If CloseMode = vbFormControlMenu Then
MsgBox "Please wait for data to load"
Cancel = True
End If
End Sub
Kill the form module
Private Sub KillTheForm()
Application.Calculate
If Not Application.CalculationState = xlDone Then
DoEvents
End If
Unload Welcome
End Sub
Bookmarks