Results 1 to 7 of 7

Thread: Splash screen that won't Unload
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Aug 2014
    Posts
    65
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Splash screen that won't Unload

    I've created a splash screen that opens when the workbook opens as planned, but does not unload after the required 3 seconds, it just stays open and does not seem to call the Sub that should close it. I'm using the code Application.OnTime Now + TimeValue("00:00:03"), "UnloadSplash" , and UnloadSplash is a Sub I have created in a general VBA module. Can anyone point me in the right direction or suggest what I can try to fix?

  2. #2
    Board Regular igold's Avatar
    Join Date
    Jul 2014
    Location
    Delray Beach, FL, USA
    Posts
    2,350
    Post Thanks / Like
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Splash screen that won't Unload

    You might try only putting the code to show the splash screen in the Workbook Module and put your timer and unload commands in the userform module. You may have to create an additional unload sub in a code module which is called from the userform.
    ​igold

    I'm a drinker with a coding problem...

    All code is written with Excel 2010 - Please test all code on a backup copy of your data.


  3. #3
    Board Regular
    Join Date
    Aug 2014
    Posts
    65
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Splash screen that won't Unload

    Yes, that is what I have done, but it doesn't work. I have since tried changing the code in the userform module from Sub frmSplash_Initialize() to UserForm_Initialize() and it comes up with an error message saying"Cannot run the macro....... The macro may not be available in this workbook or all macros may be disabled" which I cannot explain

  4. #4
    Board Regular igold's Avatar
    Join Date
    Jul 2014
    Location
    Delray Beach, FL, USA
    Posts
    2,350
    Post Thanks / Like
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Splash screen that won't Unload

    We can't be talking about a lot of code here. Probably the best thing for you to do would be to post your code...
    ​igold

    I'm a drinker with a coding problem...

    All code is written with Excel 2010 - Please test all code on a backup copy of your data.


  5. #5
    Board Regular
    Join Date
    Aug 2014
    Posts
    65
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Splash screen that won't Unload

    OK, in ThisWorkbook module I have:Private Sub Workbook_Open()
    frmSplash.Show
    End Sub

    In the UserForm module I have:

    Private Sub UserForm_Initialize()
    Application.OnTime Now + TimeValue("00:00:03"), "UnloadSplash"
    End Sub

    In a general VBA module I have:
    Sub UnloadSplash()
    Unload frmSplash
    End Sub

  6. #6
    Board Regular
    Join Date
    Aug 2014
    Posts
    65
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Splash screen that won't Unload

    igold, don't know what I've done, but now its working, thanks for taking the time my friend

  7. #7
    Board Regular igold's Avatar
    Join Date
    Jul 2014
    Location
    Delray Beach, FL, USA
    Posts
    2,350
    Post Thanks / Like
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Splash screen that won't Unload

    I am glad it is working. I don't think I had anything to do with it, but either way, thanks for the feedback!
    ​igold

    I'm a drinker with a coding problem...

    All code is written with Excel 2010 - Please test all code on a backup copy of your data.


Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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