View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jaya Jaya is offline
external usenet poster
 
Posts: 5
Default Excel Getobject error

Hi,

i have the following code in VB.
Set loXLS = GetObject(, "Excel.Application")

Dim loXLS As Excel.Application
For i = 1 To loXLS.Workbooks.Count
If loXLS.Workbooks(i).FullName = psFile Then
Exit For
End If
Next i

When a excel file is already open, this fails. And the
loxls.workbooks.count is 0. Can you tell me what could be
the reason?
-Jaya