Tim,
Are you sure you have Excel already running?
You could try something like:
try
loExcel = GetObject(, "Excel.Application")
catch
loExcel = Createobject("Excel.Application")
endtry
[Update]
Assuming CreateObject will not fail, you will need further refining of course.
>I have a system running on 15 different XP systems and 1 Vista box. The application calls Excel 2000 with:
>
> oExcel = GetObject(, "Excel.Application")
>
>Things have run fine for several years. The client got a new Vista box and now when I run the above line in the Command Window I get
>
> OLE error code 0x800401e3: Operation unavailable
>
>Any idea what the problem may be?
>
>
>Tim
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges