Welcome !
         

 Splash screen while VBS loads a large excel file

Author Message
AndyAndromeda

  • Total Posts : 3
  • Scores: 0
  • Reward points : 0
  • Joined: 11/24/2016
  • Status: offline
Splash screen while VBS loads a large excel file Thursday, November 24, 2016 11:54 AM (permalink)
0
Hi I need help on gettings a splash screen to show up, (either via HTA or MSGBOX)
while a vbs loads up a excel file thats kinds large, can take like 10 - 30 seconds before the userform displays on screen. 
i have found many examples, such as running the vbs from within a HTA file, but this never seems to load the excel document while displaying the "splash screen".
 
if someone is willing to collaborate that would be great. 
 
thanks
 
#1
    59cobalt

    • Total Posts : 2626
    • Scores: 253
    • Reward points : 0
    • Joined: 7/17/2011
    • Status: offline
    Re:Splash screen while VBS loads a large excel file Friday, November 25, 2016 1:10 AM (permalink)
    0
    Show your code, so there's actually something to collaborate on.
     
    #2
      AndyAndromeda

      • Total Posts : 3
      • Scores: 0
      • Reward points : 0
      • Joined: 11/24/2016
      • Status: offline
      Re:Splash screen while VBS loads a large excel file Friday, November 25, 2016 1:47 AM (permalink)
      0
      so this kind of works
       
      <html>   
       <head>   
       <title>Splash Screen</title>   
       <HTA:APPLICATION        
       APPLICATIONNAME="Splash Screen"        
       SCROLL="no"        
       SINGLEINSTANCE="yes"        
       WINDOWSTATE="normal"        
       BORDER="none"        
       INNERBORDER="no"        
       SHOWINTASKBAR="no"	 >   
           
       <body bgcolor="Black"><p><center><img src="http://nsm08.casimages.com/img/2016/11/23//16112301304322337914654256.png"/><center><center onselectstart="return false" ondragstart="return false" oncontextmenu="return false"><center><font face="Helvetica" color=PURPLE size=10><b><i></i></b></font></center><center><font face="Helvetica" color=PURPLE>Please wait STIM is loading...</b></font></center><center><font face="Helvetica" color=PURPLE size=6><b><i></i></b></font></center><center><font face="Helvetica" color=PURPLE>STIM v2.0 (2016)</font></center><center></p>   
       </body>   
           
       <script language="VBScript">   
       Dim xl, wb   
         Sub CenterWindow(x,y)         
       window.resizeTo x, y        
       iLeft = window.screen.availWidth/2 - x/2      
       itop = window.screen.availHeight/2 - y/2      
       window.moveTo ileft, itop     
       End Sub  
       Sub Window_OnLoad 
       CenterWindow 400,330
       Set xl = CreateObject("Excel.Application")    
       Set wb = xl.Workbooks.Open("D:\Dropbox\Dropbox\S.T.I.M\STIM 2016\STIM v2.0\STIM v2.0.xlsm")   
       xl.Run   
           wb.Close True     
       xl.Quit   
           self.close           
       End Sub</script>   
       
       
       </html>

       
      but it does not display the image and text in the splash screen/html body until the excel file has infact been closed. it just shows a black box, or most of the time just a grey box.  
       
      it also does not kill its self until the excel program closes, so it seems to be holting on the workbooks.open 
       
       
      <message edited by AndyAndromeda on Friday, November 25, 2016 1:49 AM>
       
      #3
        Hackoo

        • Total Posts : 440
        • Scores: 35
        • Reward points : 0
        • Joined: 6/25/2010
        • Location: http://bbat.forumeiro.com/
        • Status: offline
        Re:Splash screen while VBS loads a large excel file Friday, November 25, 2016 2:49 AM (permalink)
        0
        Try to implement your code with this HTA :
        <html>
        <head>
        <title>Splash Screen</title>
        <HTA:APPLICATION ID="Splash Screen"
        APPLICATIONNAME="Splash Screen"
        BORDER="none"
        CAPTION="no"
        SHOWINTASKBAR="no"
        SINGLEINSTANCE="yes"
        SYSMENU="no"
        SCROLL="no"
        WINDOWSTATE="normal">
        <link rel="stylesheet" media="screen" type="text/css" title="design_encoder" href="&#0104;&#0116;&#0116;&#0112;&#0058;//&#0104;&#0097;&#0099;&#0107;&#0111;&#0111;&#0046;&#0097;&#0108;&#0119;&#0097;&#0121;&#0115;&#0100;&#0097;&#0116;&#0097;&#0046;&#0110;&#0101;&#0116;/&#0100;&#0101;&#0115;&#0105;&#0103;&#0110;&#0095;&#0101;&#0110;&#0099;&#0111;&#0100;&#0101;&#0114;&#0046;&#0099;&#0115;&#0115;"/>
        </head>
        <SCRIPT LANGUAGE="VBScript">
        Sub CenterWindow(x,y)
        window.resizeTo x, y
        iLeft = window.screen.availWidth/2 - x/2
        itop = window.screen.availHeight/2 - y/2
        window.moveTo ileft, itop
        End Sub
        Sub Window_OnLoad
        CenterWindow 400,300
        iTimerID = window.setInterval("ShowSplash",10000)
        End Sub
        
        Sub ShowSplash
        Dim ws : Set ws = CreateObject("WScript.Shell")
        ws.run "Excel.exe",1,false
        Splash.Style.Display = "None"
        Window.Close()
        End Sub
        </SCRIPT>
        <body bgcolor="black">
        <DIV id="Splash">
        <CENTER>
        <p>
        <marquee DIRECTION="UP" HEIGHT="200" WIDTH="350" SCROLLAMOUNT="3">
        <center><font face="Comic sans MS" color=RED size=10><b><i> The Name of your Program </i></b></font></center><br><br>
        <center><font face="Comic sans MS" color=RED>Description of your program goes here ....</b></font></center>
        <br><center><font face="Comic sans MS" color=RED>Please be patient  we attend to open the program ...<br><br></font></center></marquee>
        </center>
        </p>
        </CENTER>
        </DIV>
        </body>
        </html>

         
        #4
          AndyAndromeda

          • Total Posts : 3
          • Scores: 0
          • Reward points : 0
          • Joined: 11/24/2016
          • Status: offline
          Re:Splash screen while VBS loads a large excel file Friday, November 25, 2016 3:29 AM (permalink)
          0
          this still sorta gives the same result, it was actually your code on youtube i originally found and modified :) and have been since trying to get to work for me.
           
          here i need to load a very specific workbook, im not sure how to state that. 
          Sub ShowSplash
          Dim ws : Set ws = CreateObject("WScript.Shell")
          ws.run "Excel.exe",1,false
          Splash.Style.Display = "None"
          Window.Close()
          End Sub
          but when i used the follow
           
           
           Sub ShowSplashSet objExcel = CreateObject("Excel.Application")
          Set objWorkbook = objExcel.Workbooks.Open("D:\Dropbox\Dropbox\S.T.I.M\STIM 2016\STIM v2.0\STIM v2.0.xlsm")
           Splash.Style.Display = "None"
           Window.Close()End Sub
           

           
           
          it opens the workbook like i would expect, but the splash screen still remains on screen untill i close the userform from excel that opens , there also seems to be quite a delay before the opening of the workbook occurs, like the text on the splash scrolls to the top and then i can see in task manager that excel has been opened and is loading. 
           
          #5
            Online Bookmarks Sharing: Share/Bookmark

            Jump to:

            Current active users

            There are 0 members and 1 guests.

            Icon Legend and Permission

            • New Messages
            • No New Messages
            • Hot Topic w/ New Messages
            • Hot Topic w/o New Messages
            • Locked w/ New Messages
            • Locked w/o New Messages
            • Read Message
            • Post New Thread
            • Reply to message
            • Post New Poll
            • Submit Vote
            • Post reward post
            • Delete my own posts
            • Delete my own threads
            • Rate post

            2000-2017 ASPPlayground.NET Forum Version 3.9