×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Extra! - CreateObject VBA Error

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

RE: Extra! - CreateObject VBA Error

Yes, in the FAQ it says it's for version 6.5+. The error is being caused because you are trying to create an object for the Extra System, but that object did not exists before version 6.5.

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

(OP)
Thanks for your reply.  I recorded a 1 step macro in Extra. Then copied the code at the top of the macro into VBA and it works again.  

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

As long as you're using version 6.2 of Extra, you should keep the code you copied in VBA. I don't think you'll have full functionality of the objects, but it will still pilot EB as if the code was in EB. I don't know if I ever worked on 6.2, so you're closer to the details than I am.

Glad you got it to work.

calculus

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close