View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
alexhatzisavas alexhatzisavas is offline
external usenet poster
 
Posts: 9
Default userform startup splash screen


Hi Andy.

Here's some VBA code from John Walkenbach's book 'Power programming with VBA'.

First create your form (MyStartupForm).

Then, in ThisWorkbook code module (VB editor):

Private Sub Workbook_Open()
MyStartupForm.Show
End Sub

This will show the form at start-up.

In the code module of the form:

Private Sub MyStartupForm_Activate()
Application.OnTime Now+TimeValue("00:00:05"), "Kill_The_Form"
End Sub

This will show the form for 5 seconds.

Finally, in a VBA module:
Private Sub Kill_The_Form()
Unload MyStartupForm
End Sub

This unloads the form after the 5 seconds.

Regards,
Alex



"carlito_1985" wrote:


Hi everyone, is it possible to get a userform to load up before the
workbook itself loads up?

Because I have a workbook which is about 30mB and takes about
3-4seconds to load.

Is there anyway to force a userform to show while the workbook itself
is still opening?

Thanks guys and gals.

Andy


--
carlito_1985
------------------------------------------------------------------------
carlito_1985's Profile: http://www.excelforum.com/member.php...o&userid=21390
View this thread: http://www.excelforum.com/showthread...hreadid=469760