drrocket5292
Technical User
I was able to get the attachmate type library and I now have a reference to it in Excel but now whenever I type in the code to call attachmate:
Public System As ExtraSystem
Public Sessions As ExtraSessions
Public Sess0 As ExtraSession
Public MyScn As ExtraScreen
Sub doesthiswork()
Set System = New ExtraSystem
Set Sessions = System.Sessions
Set Sess0 = System.ActiveSession
Set MyScn = Sess0.Screen
End Sub
I get an "object variable not set error" on MyScn because my sessions object = nothing. my systems object wokrs fine though so its just the sessions object that I'm having problems with. When I use the other code to try to call attachmate:
Public Sessions As Object
Public System As Object
Public Sess0 As Object
Sub pleasework()
'Extra Objects
Set System = CreateObject("EXTRA.System") ' Gets the system object
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
Set Sessions = Nothing
Set System = Nothing
Set Sess0 = Nothing
End Sub
i get a msgbox that says "could not create the sessions collections object" so once again my Sessions = nothing. Does anyone know why this would be? I'm logged into attachmate but can't seem to get excel to recognize the session.
Public System As ExtraSystem
Public Sessions As ExtraSessions
Public Sess0 As ExtraSession
Public MyScn As ExtraScreen
Sub doesthiswork()
Set System = New ExtraSystem
Set Sessions = System.Sessions
Set Sess0 = System.ActiveSession
Set MyScn = Sess0.Screen
End Sub
I get an "object variable not set error" on MyScn because my sessions object = nothing. my systems object wokrs fine though so its just the sessions object that I'm having problems with. When I use the other code to try to call attachmate:
Public Sessions As Object
Public System As Object
Public Sess0 As Object
Sub pleasework()
'Extra Objects
Set System = CreateObject("EXTRA.System") ' Gets the system object
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
Set Sessions = Nothing
Set System = Nothing
Set Sess0 = Nothing
End Sub
i get a msgbox that says "could not create the sessions collections object" so once again my Sessions = nothing. Does anyone know why this would be? I'm logged into attachmate but can't seem to get excel to recognize the session.