Spash screen on a Mac?

R

robotman

I have created a small form and routine that starts when a workbook is
opened to briefly displays a "splash screen" and then disappear.

This works great on a PC, but requires that I display the form as non-
modal. Since macs can only display forms as modal, the form will
appear, but then just freezes.

Anyone have any ideas on how to create a timed splash screen that
works on a mac?

Thanks.

John
 
C

Chip Pearson

John,

The following works fine for me in Windows. I don't know about a Mac. In
standard code module, use

Sub KillTheForm()
Unload UserForm1 ' <<< Change Form Name
End Sub

In the ThisWorkbook module, use

Private Sub Workbook_Open()
' kill the form in 5 seconds
Application.OnTime Now + TimeSerial(0, 0, 5), "KillTheForm", , True
UserForm1.Show ' <<< Change Form Name
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)
 
R

robotman

Hmmm... interesting approach. Works similiar to just making the form
modeless on the PC. Still doesn't work on a Mac, though. It seems
once the form is shown on the Mac, it stops all further processing
until the form is manually closed.

Any other ideas?!

Maybe I'm forced to have the user hit OK on the Mac splash screen
instead of having an auto timeout.
Do you know how to tell VBA to process different code depending if the
user is on a PC or Mac?

Thanks.

John
 
C

Chip Pearson

I can't think of any other way short of Win32 API calls, which obviously
aren't supported on the Mac.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)
 
R

robotman

I can't get the timeout to work on the Mac.

To get around, I used conditional compiling with #IF so if the system
detects a Mac OS, it will expand the splash form to show a "Continue"
button that the user can press to continue. On the PC, I can show the
form modeless and just unload the form after waiting. See code
below...

If anyone has ideas on how to get a timeout to work on the Mac let me
know!

Thanks!

John

Here's a snippet:

#If Win32 Then
frmSplash.Height = 82
frmSplash.Show vbModeless
Wait 3 ' Wait 3 seconds (WAIT is a small custom sub to wait
designated number of secs)
Unload frmSplash
' automatic time out
#ElseIf Mac Then
frmSplash.Height = 105 ' Expand form to show "Continue" button
which unloads the form when pressed
frmSplash.Show
' Need separate mac processing to allow user to hit OK button
' since mac's can't show form modeless
#End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top