VBA Timer

Here goes...

I have a workbook that when opened, loads a login form I created (Well the EE experts pretty much created it).  What I'd like to do, is open a form prior to the login displays a picture for a few seconds, then closes the form and loads the login form.  Can someone point me in the right direction?
neelyjerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zorvek (Kevin Jones)ConsultantCommented:
This is called a splash dialog. Here is sample code to display a splash dialog and have it close after a specified amount of time or if the form is clicked.

Place this code in the form module:

Private mTimeoutTime As Date

Public Function CheckTimer() As Boolean

   If Now() > mTimeoutTime Then
      CheckTimer = True
      Me.Hide
   End If

End Function

Private Sub UserForm_Activate()

   mTimeoutTime = Now() + TimeSerial(0, 0, 5)

End Sub

Private Sub UserForm_Click()

   mTimeoutTime = 0

End Sub

Use this code to display the splash form:

Public Sub DisplaySplash()

   frmSplash.Show vbModeless
   Do
      DoEvents
   Loop Until frmSplash.CheckTimer

End Sub

Kevin

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
neelyjerAuthor Commented:
Zorvek --

Absolute Perfection!!!
neelyjerAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.