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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2010 - Run-time error '-2147221005 (800401f3)': Invalid class string

Status
Not open for further replies.

hosehead78

Technical User
Mar 15, 2012
728
US
I had originally posted here ( however, it was suggested to try this forum.


I get the following error when I am running a spreadsheet on Windows 7 using Excel 2010.

Run-time error '-2147221005 (800401f3)': Invalid class string

The spreadsheet works fine using Excel 2003 on an XP box.

Error is at this line... It never makes it past this line. So I cannot Stop the code and cycle through via F8.
Code:
Public Sub ShowFlashForm()
    frmFlash.Show       ' *** Errors out here with [invalid class string 800401f3] error
    
End Sub

Any thoughts?
 
In the VBE options dialog, General tab, Error Trapping frame, select 'Break In All Errors' or 'Break In Class Module'. This will allow you to get the line within form code that causes error.
It's likely that you have automation error caused by third party controls. Post info on your office version (64 bit?), code that raises error, and info on other than office controls you use in your application.

combo
 
Awesome, Thanks.


Here's the line it is breaking on.

Set ssCasino = MultiPage1.Pages(0).Controls.Add("OWC.Spreadsheet")


I've found the OWC.Spreadsheet.9 ActiveX Control using the ActiveX Compatibility Manager, but I notice that it is not showing descriptions and such.
 
Ok, Figured it out, got the necessary files installed and registered. I now see the item correctly in ActiveX Compatibility Manager.

How I have another error.

Run-time error '5':
Invalid procedure call or argument

Line: DeleteSetting "Flash", "Settings", "RunDate"

So now I am going through it for this error. I will post back the files and method how I get the ActiveX Compatibility Manager and such shortly.
Thanks
 
VBA help file said:
Remarks
If all arguments are provided, the specified setting is deleted. A run-time error occurs if you attempt to use the DeleteSetting statement on a non-existent section or key setting.


combo
 
Thanks for the comment, I did not read that part. Upon figuring out where Excel stores the information in the registry, I learned that the setting does not exist, thus the error. I have since coded to check for the setting first, it is currently working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top