开发者

How to create splash screen when Excel start?

开发者 https://www.devze.com 2023-03-29 03:27 出处:网络
I am new to excel programming and I want to create a popup 开发者_如何学Pythonscreen when my excel file is opened so can anyone tell me how to create a splash screen when excel start?Build a custom fo

I am new to excel programming and I want to create a popup 开发者_如何学Pythonscreen when my excel file is opened so can anyone tell me how to create a splash screen when excel start?


Build a custom form that consists entirely of the desired splash image. Then call that form for a set period of time upon the load of your spreadsheet/app.

UPDATE Now with code (or at least links):

Like I said above, this question is dealt with extensively on forums across the inter-verse.

DailyDose seems to have the simplest and most straightforward implementation of the splash screen, making a few important points about running the form as modal to allow your app code to keep running behind the splash.

The code is very simple:

    Sub StartProgram()
        Dim dtDelay As Date

        dtDelay = Now
        ufSplash.Show

        ‘Do initialization stuff
         If Now < (dtDelay + TimeSerial(0, 0, 5)) Then
             Application.Wait dtDelay + TimeSerial(0, 0, 5)
         End If

         Unload ufSplash

    End Sub

VBA Express has a macro that'll run a slow fade on the form and then close it when it gets completely invisible.

0

精彩评论

暂无评论...
验证码 换一张
取 消