ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open another program (https://www.excelbanter.com/excel-programming/366829-open-another-program.html)

Striker

Open another program
 
How can I open another program from inside excel? Say I have an executable
in the root of C called st.exe.
C:\ST.Exe. If this is called I want to close excel WITHOUT saving the
changes.

Thanks for your help.



Tom Ogilvy

Open another program
 

. . .
shell "C:\st.exe"
for each bk in workbooks
if bk.Name < thisworkbook.Name then
bk.close Savechanges:=False
end if
Next

Thisworkbook.Close Savechanges:=False
End Sub

--
Regards,
Tom Ogilvy


"Striker" wrote:

How can I open another program from inside excel? Say I have an executable
in the root of C called st.exe.
C:\ST.Exe. If this is called I want to close excel WITHOUT saving the
changes.

Thanks for your help.




Striker

Open another program
 
Thanks Tom, I'll give this a try today.

"Tom Ogilvy" wrote in message
...

. . .
shell "C:\st.exe"
for each bk in workbooks
if bk.Name < thisworkbook.Name then
bk.close Savechanges:=False
end if
Next

Thisworkbook.Close Savechanges:=False
End Sub

--
Regards,
Tom Ogilvy


"Striker" wrote:

How can I open another program from inside excel? Say I have an
executable
in the root of C called st.exe.
C:\ST.Exe. If this is called I want to close excel WITHOUT saving the
changes.

Thanks for your help.







All times are GMT +1. The time now is 05:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com