Extra! - CreateObject VBA Error
Extra! - CreateObject VBA Error
(OP)
I'm a newbie to programming Extra! version 6.2 using Microsoft Excel 2000 VBA. I get my code to work, but keep getting the following error on some occasions when using the program on a given day:
Run-time error '-2147221231 (80040111)'
Automation error - ClassFactory cannot supply requested class
I've used code posted in calculus' FAQ, but keep getting this error.
My code to attach to Extra! is:
Dim Sessions As Object
Dim System As Object
Dim Sess0 As Object
Set System = CreateObject("EXTRA.System")
If (System Is Nothing) Then MsgBox "Could not create the EXTRA System object. Stopping macro playback.": Stop
Set Sessions = System.Sessions
If (Sessions Is Nothing) Then: MsgBox "Could not create the Sessions collection object. Stopping macro playback.": Stop
Set Sess0 = System.ActiveSession
If (Sess0 Is Nothing) Then MsgBox "Could not create the Session object. Stopping macro playback.": Stop
I Get the error on:
Set System = CreateObject("EXTRA.System")
Is there something I am missing here? Could this be caused by the version of Extra! (6.2) that I'm working with? Any help would be greatly appreciated.
Joe
Run-time error '-2147221231 (80040111)'
Automation error - ClassFactory cannot supply requested class
I've used code posted in calculus' FAQ, but keep getting this error.
My code to attach to Extra! is:
Dim Sessions As Object
Dim System As Object
Dim Sess0 As Object
Set System = CreateObject("EXTRA.System")
If (System Is Nothing) Then MsgBox "Could not create the EXTRA System object. Stopping macro playback.": Stop
Set Sessions = System.Sessions
If (Sessions Is Nothing) Then: MsgBox "Could not create the Sessions collection object. Stopping macro playback.": Stop
Set Sess0 = System.ActiveSession
If (Sess0 Is Nothing) Then MsgBox "Could not create the Session object. Stopping macro playback.": Stop
I Get the error on:
Set System = CreateObject("EXTRA.System")
Is there something I am missing here? Could this be caused by the version of Extra! (6.2) that I'm working with? Any help would be greatly appreciated.
Joe
RE: Extra! - CreateObject VBA Error
There may be a workaround for you on version 6.2, but I'm not sure what it would be. Start by recording a 1 step macro in Extra. Then copy the code at the top of the macro into VBA. You may have to play with it some, or it may just not work.
Good coding...
calculus
RE: Extra! - CreateObject VBA Error
This has worked for me in the past, but I was just hoping there was a way to eliminate this step going forward. Some days I don't need to do this, but eventually, I get the error stated above. Any suggestions?
Joe
RE: Extra! - CreateObject VBA Error
Glad you got it to work.
calculus