View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
George[_32_] George[_32_] is offline
external usenet poster
 
Posts: 5
Default Active Sheet Error Message

I'm getting the error message below from VBA from the following code on Line
2

Debug.Print ActiveWorkbook.Name
Debug.Print ActiveWorkbook.ActiveSheet

Run-time error '-2147319765 (8002802b)'

Automation Error
Element not found.



I added ActiveWorkbook as a Watch Expression in the Watch window, and I can
click on the + and I can see an entry as a child record for ActiveSheet. I
can click on the ActiveSheet entry and see the name of the ActiveSheet. The
element clearly is there in the Watch Window but not seen in the program.

Why is VB telling me the Automation Object can't be found?