Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starting application with VBScript 1

Status
Not open for further replies.

thelocaluk

Technical User
Dec 8, 2005
11
GB
Hi, I use the following VB script to start my application
CODE
Dim objXL
Set objXL = WScript.CreateObject("Excel.Application")
objXL.WorkBooks.Open "\\Oxfsrv1\USERS\Common\Andre's Work Folder\IQuaTracker\IquaDemo.xls"
I don't want this script to run if the applicaion is already open, how do I do that?
 
on error resume next
set x = getobject(,"excel.application")
if err.number<>0 then
set x = createobject("excel.application")
err.clear
end if
 
no probs, not sure the Err.Clear is needed/best idea after the second Set but glad it does what you were after
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top