Creating Splash Screen in MS Office 2003-VBForums
Results 1 to 6 of 6

Thread: Creating Splash Screen in MS Office 2003

  1. #1

    Thread Starter
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,928

    Creating Splash Screen in MS Office 2003

    Now you can create your own splash screens in MS Office 2003. I have shown an example in Excel. This can be modified slightly to work in MS-Word, MS-Powerpoint etc...

    Create a userform. Name it say "frmSplash"

    In the userform code window, paste this code

    Code:
    'Set this to true to close the form
    Public CloseMe As Boolean
    
    Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
        Cancel = Not CloseMe
    End Sub
    I have used a button to start the flash, You can use a sub and call it form the button or even put it in the Workbook open event...

    Code:
    Sub KoolSplash()
        Dim frm As frmSplash
        Dim i As Integer
        Dim j As Double
    
        '-- Deactivate Keyboard.
        Application.OnKey "^d", "KeyboardOn"
        Application.DataEntryMode = True
    
        '-- Display the Splash Form
        Set frm = New frmSplash
        frm.CloseMe = False
        frm.KoolPrgBar.Value = 0 '-- KoolPrgBar is the progressbar
        frm.Show False '-- Non Modal
    
        '-- Perform your task here while splash is shown.
        For i = 0 To 100 Step 10
            frm.KoolPrgBar.Value = i
    
            '-- Example -> I am killing time here... lol
            'Replace it with your code
            For j = 1 To 100000
                DoEvents
            Next j
        Next i
    
        '-- Close the Splash Form.
        frm.CloseMe = True
        Unload frm
    
        '-- Re-Activate keyboard.
        Application.DataEntryMode = False
    End Sub
    Project Attached...
    Attached Images Attached Images  
    Attached Files Attached Files
    The poster formerly known as koolsid
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - Till Date IMP Links : Acceptable Use Policy, FAQ

    MyGear:
    Sony VGN-FZ27G with a triple boot between (XP+Office 2003+VB6), (VISTA+Office 2007+VS2008) and (Win7+Office 2010+VS2010) || Sony VPCCB-45FN with a Win7+Office 2010+VS2010. VM: (XP+Office 2003+VB6), (VISTA+Office 2007+VS2008), (Win8+Office 2010+VS2012) || Mac Book Pro (10.6.8) with Office 2011

  2. #2
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,102

    Re: Creating Splash Screen in MS Office 2003

    Good work there Sid but since you are using the VB6 progresbar you may want to mention that systems without the microsoft common controls will need to have the vb6 redistributables installed on it
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  3. #3

    Thread Starter
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,928

    Re: Creating Splash Screen in MS Office 2003

    Good point Rob.

    Here is another example of creating a splash screen using Animation and The Timer API

    Please unzip all the files in C:\temp before running.

    Edit: I have used two images. If you want you can use more than that. Simply name the images 0.Gif, 1.Gif, 2.Gif and so on... Then Change the code in module to

    vb Code:
    1. Sub TimerProc(ByVal HWnd As Long, ByVal uMsg As Long, _
    2. ByVal nIDEvent As Long, ByVal dwTimer As Long)
    3.     '~~> You can use bmp, gif etc...
    4.     UserForm1.Image1.Picture = LoadPicture("C:\temp\" & Counter & ".bmp")
    5.     Counter = Counter + 1
    6.     If Counter = 10 Then
    7.         EndTimer
    8.         Unload UserForm1
    9.     End If
    10. End Sub
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by Siddharth Rout; Mar 13th, 2009 at 01:35 AM.
    The poster formerly known as koolsid
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - Till Date IMP Links : Acceptable Use Policy, FAQ

    MyGear:
    Sony VGN-FZ27G with a triple boot between (XP+Office 2003+VB6), (VISTA+Office 2007+VS2008) and (Win7+Office 2010+VS2010) || Sony VPCCB-45FN with a Win7+Office 2010+VS2010. VM: (XP+Office 2003+VB6), (VISTA+Office 2007+VS2008), (Win8+Office 2010+VS2012) || Mac Book Pro (10.6.8) with Office 2011

  4. #4

    Thread Starter
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,928

    Re: Creating Splash Screen in MS Office 2003

    Here is another example to create a splash screen like vb6 in vba

    Using a Borderless form to achieve what you want....

    The splash will autoclose in approx 8 seconds....
    Attached Images Attached Images  
    Attached Files Attached Files
    The poster formerly known as koolsid
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - Till Date IMP Links : Acceptable Use Policy, FAQ

    MyGear:
    Sony VGN-FZ27G with a triple boot between (XP+Office 2003+VB6), (VISTA+Office 2007+VS2008) and (Win7+Office 2010+VS2010) || Sony VPCCB-45FN with a Win7+Office 2010+VS2010. VM: (XP+Office 2003+VB6), (VISTA+Office 2007+VS2008), (Win8+Office 2010+VS2012) || Mac Book Pro (10.6.8) with Office 2011

  5. #5
    Hyperactive Member
    Join Date
    Jun 2009
    Location
    England!
    Posts
    364

    Re: Creating Splash Screen in MS Office 2003

    can you make this screen automatic?
    so that when you open the excel document it will just appear?

  6. #6

    Thread Starter
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,928

    Re: Creating Splash Screen in MS Office 2003

    Hi hensucker

    the answer to your question lies in the 1st post above.

    I have used a button to start the flash, You can use a sub and call it from the button or even put it in the Workbook open event...
    The poster formerly known as koolsid
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - Till Date IMP Links : Acceptable Use Policy, FAQ

    MyGear:
    Sony VGN-FZ27G with a triple boot between (XP+Office 2003+VB6), (VISTA+Office 2007+VS2008) and (Win7+Office 2010+VS2010) || Sony VPCCB-45FN with a Win7+Office 2010+VS2010. VM: (XP+Office 2003+VB6), (VISTA+Office 2007+VS2008), (Win8+Office 2010+VS2012) || Mac Book Pro (10.6.8) with Office 2011

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.