Sharid
Well-known Member
- Joined
- Apr 22, 2007
- Messages
- 1,064
- Office Version
- 2016
- Platform
- Windows
I have an excel splash screen that opens when Sheet1("Cover ") is activated. However my problems is that the splash screen shows before excel is fully loaded and Sheet1 "Cover" visible (See Image below, Splash screen is showing behind the excel splash screen). This then causes a problem as Userform1 can not Show
Splash Screen should only open when excel is full loaded and sheet1 is active,
Code for Splash Screen is below the splash screen has a progress bar on it and 4 x messages will pop up. All this works fine,
Sub Code
VBA Code:
Private Sub Workbook_Open()
Worksheets("Cover").Activate
End Sub
Splash Screen should only open when excel is full loaded and sheet1 is active,
Code for Splash Screen is below the splash screen has a progress bar on it and 4 x messages will pop up. All this works fine,
VBA Code:
Private Sub Worksheet_Activate()
SplashUserForm.Show
SplashUserForm.LabelProgress.Width = 0 'Progress Bar SplashUserForm
Application.Wait (Now + TimeValue("00:00:02"))
SplashUserForm.Label1.Caption = [B]"Message 1"[/B]
SplashUserForm.Repaint
'Progress Bar
FractionComplete (0) '(Step 1)
FractionComplete (0.2) '(Step 1)
Application.Wait (Now + TimeValue("00:00:03"))
SplashUserForm.Label1.Caption =[B] "Message 2"[/B]
SplashUserForm.Repaint
'''''Progress Bar
FractionComplete (0.25) '(Step 2)
FractionComplete (0.51) '(Step 2)
SplashUserForm.Repaint
Application.Wait (Now + TimeValue("00:00:06"))
SplashUserForm.Label1.Caption =[B] "*** Message 3***"[/B]
SplashUserForm.Repaint
'Progress Bar
FractionComplete (0.51) '(Step 3)
FractionComplete (0.71) '(Step 3)
SplashUserForm.Repaint
Application.Wait (Now + TimeValue("00:00:03"))
SplashUserForm.Label1.Caption = [B]"Message 4"[/B]
SplashUserForm.Repaint
'Progress Bar
FractionComplete (0.76) '(Step 4)
FractionComplete (0.96) '(Step 4)
FractionComplete (1) '(Step 4 Final)
SplashUserForm.Repaint
Application.Wait (Now + TimeValue("00:00:03"))
Unload SplashUserForm
UserForm1.Show '########### Since the splash screen opens before excel is fully loaded , this userform can not be found and an error happens #########
End Sub
Sub Code
VBA Code:
Sub FractionComplete(pctdone As Single)
With SplashUserForm
' .LabelCaption.Caption = pctdone * 100 & "% Complete"
.LabelProgress.Width = pctdone * (.FrameProgress.Width)
End With
DoEvents
End Sub