×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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!
  • Students Click Here

*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

Jobs

Upgraded to Office 2010, VBA not working

Upgraded to Office 2010, VBA not working

Upgraded to Office 2010, VBA not working

(OP)
Hi - first time poster. I was recently upgraded from Office 2007 to 2010 and from Attachmate Extra X-treme 9.1 to Attachmate Reflection Suite for X 2011 R2.

The code that I had in Excel 2007 to connect to Attachmate does not work, and I've tried unsuccessfully to surf the internet for the solution. When I run it, it fails here

Sub Test_GetPricing()

Dim g_HostSettleTime%
g_HostSettleTime = 50

Dim F_HostSettleTime%
F_HostSettleTime = 50


Dim Sessions As Object
Dim System As Object


Set System = CreateObject("EXTRA.System")
If (System Is Nothing) Then
MsgBox "error1"
Stop
End If
Set Sessions = System.Sessions


' Get the necessary Session Object
Dim Sess0 As Object
Set Sess0 = System.ActiveSession
If (Sess0 Is Nothing) Then
MsgBox "Could not create the Session object. Stopping macro playback."
Stop

End If
If Not Sess0.Visible Then Sess0.Visible = True


I am not trained in VB, so I appreciate any feedback.
Thanks
Ben

RE: Upgraded to Office 2010, VBA not working

Hi,

What exactly do you mean by fails?

Errors? Then what error message.

Fails to Set the Session bkect???

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Upgraded to Office 2010, VBA not working

(OP)
I get the "Could not create the Session object. Stopping macro playback." pop-up in Excel.

RE: Upgraded to Office 2010, VBA not working

Try this...

CODE

Dim Sess0 As Object
Set Sess0 = System.Sessions(1)
If (Sess0 Is Nothing) Then
MsgBox "Could not create the Session object. Stopping macro playback."
Stop 
If 1 doesn't work try 0.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Upgraded to Office 2010, VBA not working

(OP)
Using both a 0 or 1, I get:
Run-time error '450':
Wrong number of arguments or invalid property assignment

RE: Upgraded to Office 2010, VBA not working

So do you have an Extra Attachmate session open when you run this procedure?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Upgraded to Office 2010, VBA not working

(OP)
It is an "Attachmate Reflection Workspace" that is open.

RE: Upgraded to Office 2010, VBA not working

I can't help you with Reflection. I don't know if the Workspace is a Session. There may be some other Object, like Workspace Object?

What does your HELP say?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

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