Consulting

Results 1 to 6 of 6

Thread: Solved: VBA Splash screen

  1. #1
    VBAX Mentor tpoynton's Avatar
    Joined
    Feb 2005
    Location
    Clinton, MA
    Posts
    399
    Location

    Solved: VBA Splash screen

    Greetings,

    I have followed the directions at http://www.ozgrid.com/Excel/excel-splash-screen.htm to the letter for creating a splash screen; it works fine on the PC, but on a Mac (office 2004) the timer seems to fail; the splash screen appears, but I have to manually close it...no errors are present. any ideas?

    PS - i also checked i the Mac help to make sure that the "now" part of the time function could be used...it is documented.

    THANKS!

  2. #2
    Mac Moderator VBAX Expert shades's Avatar
    Joined
    May 2004
    Location
    Kansas City, USA
    Posts
    638
    Location
    Can you post the exact code you are using at each step?

    Software: LibreOffice 3.3 on Mac OS X 10.6.5
    (retired Excel 2003 user, 3.28.2008 )
    Humanware: Older than dirt
    --------------------
    old, slow, and confused
    but at least I'm inconsistent!

    Rich

  3. #3
    VBAX Mentor tpoynton's Avatar
    Joined
    Feb 2005
    Location
    Clinton, MA
    Posts
    399
    Location
    OK -

    here is what i have in ThisWorkbook
    [vba]
    Private Sub Workbook_Open()
    Splash.Show
    End Sub
    [/vba]

    here's what i have in my only module
    [vba]
    Sub KillForm()
    Unload Splash
    End Sub
    [/vba]

    here's what i have in the userform named Splash
    [vba]
    Private Sub UserForm_Initialize()
    Application.OnTime Now + TimeValue("00:00:03"), "KillForm"
    End Sub
    [/vba]

    THANKS!

  4. #4
    VBAX Tutor
    Joined
    Mar 2005
    Posts
    268
    Location
    After trying a few things, it looks like it might be a consequence of the non-support for non-modal forms in Mac Office. Once that form is open, no code executes until the form is closed. Stick a MsgBox in with your Unload - you'll see.

    Not sure where to go with this. The obvious alternative - putting an Application.Wait followed by Unload Me into Userform_Initialize() doesn't work because you can't Unload before Initialize has completed.

    BTW, I would bet that if you have a copy of Excel 97 lying around, you'd see the exact same problem there.

  5. #5
    Mac Moderator VBAX Expert shades's Avatar
    Joined
    May 2004
    Location
    Kansas City, USA
    Posts
    638
    Location
    I found the same thing. VB 5 is behind XL 2004 and XL 97. I know that in helping another person last year convert UserForms, it was a pain to get them to work properly on the Mac.

    Software: LibreOffice 3.3 on Mac OS X 10.6.5
    (retired Excel 2003 user, 3.28.2008 )
    Humanware: Older than dirt
    --------------------
    old, slow, and confused
    but at least I'm inconsistent!

    Rich

  6. #6
    VBAX Mentor tpoynton's Avatar
    Joined
    Feb 2005
    Location
    Clinton, MA
    Posts
    399
    Location

    Solved, sort of

    I have it working...for pc's, and set it not to show if the OS is Mac. I also put in an "on error resume next" just in case there are some Excel 97 users. This is a better solution than having no splash screen at all!

    Thanks Shades and BlueCactus for investigating!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •