LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Cannot Get Instance of Com component Microsoft.Office.Interop.Excel.Worksheet with Excel Interface Error.

PS
I should have clarified it's not possible to check the .Ready state with all
dialogs and situations, though in a quick check it should work with your
particular error message.

Peter T

"Peter T" <peter_t@discussions wrote in message
...
While an Excel dialog is displayed normally you cannot automate Excel.
This can pose a dilemma if you are not sure what the dialog is, why it is
displaying and is it waiting for the user to handle (whilst gone for a
coffee) or triggered due to some action of your own code.

Assuming at least you have an object reference to the application you can
try something like this (either in advance or after catching the error)

If xlApp.Ready = False then
some dialog showing or user in edit mode
loop with a timer until .Ready = true or abort
or perhaps even SendKeys (or API equivalent) an Esc to dismiss the known
dialog


Regards,
Peter T


"Michael G." wrote in message
...
There is one UI instance of Excel 2007 up with an error message and
when I try to instantiate the worksheet component through VB.Net I get
this error: It seems that the UI instance is blocking access to the
worksheet component.

VB.Net Error:
"Creating an instance of the COM component with CLSID
{00020820-0000-0000-C000-000000000046} from the IClassFactory failed
due to the following error: 80010001."


Excel UI Error:
The file you are trying to open test.xls is in a different format than
specified by the file extension.

VB.Net Code:
Dim MainWorkSheet As New Microsoft.Office.Interop.Excel.Worksheet







 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in excel com: Microsoft.Office.Interop.Excel Exception from HRESULT: 0x800A03EC srinivas[_3_] Excel Programming 3 May 29th 09 02:13 PM
Microsoft.Office.Interop.Excel.Application Andie Excel Programming 1 May 22nd 09 04:27 AM
Microsoft.Office.Interop.Excel Texttocolumns C# Cheryl[_5_] Excel Programming 1 April 6th 07 08:40 PM
Where can I find Microsoft.Office.Interop.Excel.dll? Fred Abrahamian Excel Programming 1 December 17th 06 10:52 PM
Microsoft.Office.Interop.Excel SaveAs error when clicking no or ca NeedsExcelAssistance Excel Programming 0 July 14th 06 02:50 PM


All times are GMT +1. The time now is 10:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"