Delay excel startup

Archived from groups: microsoft.public.windowsxp.general (More info?)

Hi all,

I have an excel spreadsheet that starts up from the start-up folder. The
problem is that it starts up before another program does that imports DDE
data into the spreadsheet. This would then cause the spreadsheet to hang. Is
it possible to place a delay statement in the start-up line that would delay
the excel spreadsheet for 5 or 10 seconds.

Thanks for the help.
8 answers Last reply
More about delay excel startup
  1. Archived from groups: microsoft.public.windowsxp.general (More info?)

    "Gee" <gordongradwell@icon.co.za> wrote in message
    news:Oq7AgC0lFHA.2156@TK2MSFTNGP14.phx.gbl...
    > Hi all,
    >
    > I have an excel spreadsheet that starts up from the start-up folder. The
    > problem is that it starts up before another program does that imports DDE
    > data into the spreadsheet. This would then cause the spreadsheet to hang.
    > Is
    > it possible to place a delay statement in the start-up line that would
    > delay
    > the excel spreadsheet for 5 or 10 seconds.
    >
    > Thanks for the help.
    >
    >
    Try microsoft.public.excel.programming
    >
  2. Archived from groups: microsoft.public.windowsxp.general (More info?)

    You would need to create a batch file, to start the excel file, a delay can
    be implimented in the batch file.
    Probably a dos ng would assist, I'm a little rusty on batch file syntax

    "Gee" <gordongradwell@icon.co.za> wrote in message
    news:Oq7AgC0lFHA.2156@TK2MSFTNGP14.phx.gbl...
    > Hi all,
    >
    > I have an excel spreadsheet that starts up from the start-up folder. The
    > problem is that it starts up before another program does that imports DDE
    > data into the spreadsheet. This would then cause the spreadsheet to hang.
    Is
    > it possible to place a delay statement in the start-up line that would
    delay
    > the excel spreadsheet for 5 or 10 seconds.
    >
    > Thanks for the help.
    >
    >
    >
  3. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Hi

    You may be better off posting to an Excel News Group:

    news://msnews.microsoft.com/microsoft.public.excel or
    http://aumha.org/nntp.htm

    --

    Will Denny
    MS-MVP Windows Shell/User
    Please reply to the News Groups


    "Gee" <gordongradwell@icon.co.za> wrote in message
    news:Oq7AgC0lFHA.2156@TK2MSFTNGP14.phx.gbl...
    > Hi all,
    >
    > I have an excel spreadsheet that starts up from the start-up folder. The
    > problem is that it starts up before another program does that imports DDE
    > data into the spreadsheet. This would then cause the spreadsheet to hang.
    > Is
    > it possible to place a delay statement in the start-up line that would
    > delay
    > the excel spreadsheet for 5 or 10 seconds.
    >
    > Thanks for the help.
    >
    >
    >
  4. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Gee wrote:

    > Hi all,
    >
    > I have an excel spreadsheet that starts up from the start-up folder. The
    > problem is that it starts up before another program does that imports DDE
    > data into the spreadsheet. This would then cause the spreadsheet to hang. Is
    > it possible to place a delay statement in the start-up line that would delay
    > the excel spreadsheet for 5 or 10 seconds.
    >
    > Thanks for the help.
    Hi,

    Put a batch file (.bat or .cmd) or a VBScript file (.vbs) file in the
    startup folder, and let it create the pause before launching Excel.
    Note that the spreadsheet or a shortcut to the spreadsheet must not
    be placed in the startup folder.

    Below is both a batch file and a VBScript that will do the job (note
    that the batch file will display a console window for 10 seconds, the
    VBScript will not).


    Batch file:

    --------------------8<----------------------
    @echo off
    :: pause for about 10 seconds
    ping.exe -n 11 127.0.0.1

    :: launch Excel with specified file
    start excel.exe "c:\my data\some.xls"
    exit
    --------------------8<----------------------


    VBScript:

    '--------------------8<----------------------

    ' Spreadsheet to be opened
    sFile = "c:\my data\some.xls"

    Set oShell = CreateObject("WScript.Shell")

    ' pause 10 seconds
    WScript.Sleep 10 * 1000

    ' launch Excel with specified file
    oShell.Run "excel.exe """ & sFile & """", 1, False

    '--------------------8<----------------------


    --
    torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
    Administration scripting examples and an ONLINE version of
    the 1328 page Scripting Guide:
    http://www.microsoft.com/technet/scriptcenter/default.mspx
  5. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Thanks for the answer much appreciated.
    Gee

    "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
    news:O61bVX1lFHA.1948@TK2MSFTNGP12.phx.gbl...
    > Gee wrote:
    >
    > > Hi all,
    > >
    > > I have an excel spreadsheet that starts up from the start-up folder. The
    > > problem is that it starts up before another program does that imports
    DDE
    > > data into the spreadsheet. This would then cause the spreadsheet to
    hang. Is
    > > it possible to place a delay statement in the start-up line that would
    delay
    > > the excel spreadsheet for 5 or 10 seconds.
    > >
    > > Thanks for the help.
    > Hi,
    >
    > Put a batch file (.bat or .cmd) or a VBScript file (.vbs) file in the
    > startup folder, and let it create the pause before launching Excel.
    > Note that the spreadsheet or a shortcut to the spreadsheet must not
    > be placed in the startup folder.
    >
    > Below is both a batch file and a VBScript that will do the job (note
    > that the batch file will display a console window for 10 seconds, the
    > VBScript will not).
    >
    >
    >
    > Batch file:
    >
    > --------------------8<----------------------
    > @echo off
    > :: pause for about 10 seconds
    > ping.exe -n 11 127.0.0.1
    >
    > :: launch Excel with specified file
    > start excel.exe "c:\my data\some.xls"
    > exit
    > --------------------8<----------------------
    >
    >
    > VBScript:
    >
    > '--------------------8<----------------------
    >
    > ' Spreadsheet to be opened
    > sFile = "c:\my data\some.xls"
    >
    > Set oShell = CreateObject("WScript.Shell")
    >
    > ' pause 10 seconds
    > WScript.Sleep 10 * 1000
    >
    > ' launch Excel with specified file
    > oShell.Run "excel.exe """ & sFile & """", 1, False
    >
    > '--------------------8<----------------------
    >
    >
    > --
    > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
    > Administration scripting examples and an ONLINE version of
    > the 1328 page Scripting Guide:
    > http://www.microsoft.com/technet/scriptcenter/default.mspx
  6. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Thanks Torgeir,

    One last question how do I get this spreadsheet to run minimized or in the
    background after opening. I want it behind the other program that opens, so
    nobody closes it by accident. I'm using the VB script to execute the
    spreadsheet.

    Thanks Gee

    "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
    news:O61bVX1lFHA.1948@TK2MSFTNGP12.phx.gbl...
    > Gee wrote:
    >
    > > Hi all,
    > >
    > > I have an excel spreadsheet that starts up from the start-up folder. The
    > > problem is that it starts up before another program does that imports
    DDE
    > > data into the spreadsheet. This would then cause the spreadsheet to
    hang. Is
    > > it possible to place a delay statement in the start-up line that would
    delay
    > > the excel spreadsheet for 5 or 10 seconds.
    > >
    > > Thanks for the help.
    > Hi,
    >
    > Put a batch file (.bat or .cmd) or a VBScript file (.vbs) file in the
    > startup folder, and let it create the pause before launching Excel.
    > Note that the spreadsheet or a shortcut to the spreadsheet must not
    > be placed in the startup folder.
    >
    > Below is both a batch file and a VBScript that will do the job (note
    > that the batch file will display a console window for 10 seconds, the
    > VBScript will not).
    >
    >
    >
    > Batch file:
    >
    > --------------------8<----------------------
    > @echo off
    > :: pause for about 10 seconds
    > ping.exe -n 11 127.0.0.1
    >
    > :: launch Excel with specified file
    > start excel.exe "c:\my data\some.xls"
    > exit
    > --------------------8<----------------------
    >
    >
    > VBScript:
    >
    > '--------------------8<----------------------
    >
    > ' Spreadsheet to be opened
    > sFile = "c:\my data\some.xls"
    >
    > Set oShell = CreateObject("WScript.Shell")
    >
    > ' pause 10 seconds
    > WScript.Sleep 10 * 1000
    >
    > ' launch Excel with specified file
    > oShell.Run "excel.exe """ & sFile & """", 1, False
    >
    > '--------------------8<----------------------
    >
    >
    > --
    > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
    > Administration scripting examples and an ONLINE version of
    > the 1328 page Scripting Guide:
    > http://www.microsoft.com/technet/scriptcenter/default.mspx
  7. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Gee wrote:

    > Thanks Torgeir,
    >
    > One last question how do I get this spreadsheet to run minimized or in the
    > background after opening. I want it behind the other program that opens, so
    > nobody closes it by accident. I'm using the VB script to execute the
    > spreadsheet.
    >
    Hi,

    oShell.Run "excel.exe """ & sFile & """", 1, False

    You could play with the intWindowStyle setting for the Run method in
    the line above (the second parameter currently set to 1).

    Here is a snippet from the WSH documentation from the documentation
    of intWindowStyle (listed under the Run method):


    4 Displays a window in its most recent size and position. The active
    window remains active.

    7 Displays the window as a minimized window. The active window
    remains active.

    8 Displays the window in its current state. The active window
    remains active.


    WSH 5.6 documentation (local help file) can be downloaded
    from here if you haven't got it already:
    http://msdn.microsoft.com/downloads/list/webdev.asp


    --
    torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
    Administration scripting examples and an ONLINE version of
    the 1328 page Scripting Guide:
    http://www.microsoft.com/technet/scriptcenter/default.mspx
  8. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Thanks works like a dream.


    "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
    news:#1XrmT3lFHA.1948@TK2MSFTNGP12.phx.gbl...
    > Gee wrote:
    >
    > > Thanks Torgeir,
    > >
    > > One last question how do I get this spreadsheet to run minimized or in
    the
    > > background after opening. I want it behind the other program that opens,
    so
    > > nobody closes it by accident. I'm using the VB script to execute the
    > > spreadsheet.
    > >
    > Hi,
    >
    > oShell.Run "excel.exe """ & sFile & """", 1, False
    >
    > You could play with the intWindowStyle setting for the Run method in
    > the line above (the second parameter currently set to 1).
    >
    > Here is a snippet from the WSH documentation from the documentation
    > of intWindowStyle (listed under the Run method):
    >
    >
    > 4 Displays a window in its most recent size and position. The active
    > window remains active.
    >
    > 7 Displays the window as a minimized window. The active window
    > remains active.
    >
    > 8 Displays the window in its current state. The active window
    > remains active.
    >
    >
    >
    > WSH 5.6 documentation (local help file) can be downloaded
    > from here if you haven't got it already:
    > http://msdn.microsoft.com/downloads/list/webdev.asp
    >
    >
    > --
    > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
    > Administration scripting examples and an ONLINE version of
    > the 1328 page Scripting Guide:
    > http://www.microsoft.com/technet/scriptcenter/default.mspx
Ask a new question

Read More

Excel Spreadsheet Microsoft Windows XP