Sign in with
Sign up | Sign in
Your question

Delay excel startup

Last response: in Windows XP
Share
August 2, 2005 3:03:30 PM

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.

More about : delay excel startup

Anonymous
August 2, 2005 3:03:31 PM

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

"Gee" <gordongradwell@icon.co.za> wrote in message
news:o q7AgC0lFHA.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
>
August 2, 2005 3:29:16 PM

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:o q7AgC0lFHA.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.
>
>
>
Related resources
Anonymous
August 2, 2005 3:30:39 PM

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:o q7AgC0lFHA.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.
>
>
>
Anonymous
August 2, 2005 5:31:55 PM

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.m...
August 2, 2005 5:59:17 PM

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:o 61bVX1lFHA.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.m...
August 2, 2005 7:04:35 PM

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:o 61bVX1lFHA.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.m...
Anonymous
August 2, 2005 9:14:17 PM

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.m...
August 3, 2005 11:35:30 AM

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.m...
!