I have a splash screen that appears when Excel is opened. Normally it disappears after a few seconds and a progress bar shows time remaining. I want to be able to stop the splash screen from disappearing so I added a command button to the splashscreen (form) labeled "pause", if clicked I should temporarily stop the progress bar and allow the splashscreen to remain in view. Here’s what I have so far: 1. An Open event (for Workbook) brings the splashscreen into view: Private Sub Workbook_Open() SplashScreen.Show End Sub 2. The form code (for splash screen) does this: Private Sub UserForm_Activate() Dim dTime As Date Dim i As Integer For i = 1 To 100 Step 15 dTime = Now + TimeValue("0:00:01") Application.Wait TimeValue(dTime) ProgressBar1.Value = i Next i Call EndSplash End Sub 3. The For i loop delays the call of EndSplash for ~5 seconds. While the loop is executing I think I need to check the state of a command button to see if the user has clicked it (or not), just not sure how to do this. Well that's my though, maybe I am in left field and there is a better method, the main point is, how to temporarily stop the slash screen from dissapearing automatically. Appreciate any help and thanks in advance.
|