how i create a function who create a session?
i did this function, but when i execute, it close the window of attachmate, i tryed run in another pc.... and close the window too
Function criarSession() as Object
Dim System As Object
Dim Sessions As Object
Dim Sess0 As Object
Set System = CreateObject("EXTRA.System")
If (System is Nothing) Then
Msgbox "Não pôde criar o objeto de SistemaEXTRA."
STOP
End If
Set Sessions = System.Sessions
If (Sessions is Nothing) Then
Msgbox "Não pôde criar o objeto de coleção Sessions."
STOP
End If
Set Sess0 = System.ActiveSession
If (Sess0 is Nothing) Then
Msgbox "Não pôde criar o objeto Session."
STOP
End If
criarSession = Sess0
End Function
i did this function, but when i execute, it close the window of attachmate, i tryed run in another pc.... and close the window too
Function criarSession() as Object
Dim System As Object
Dim Sessions As Object
Dim Sess0 As Object
Set System = CreateObject("EXTRA.System")
If (System is Nothing) Then
Msgbox "Não pôde criar o objeto de SistemaEXTRA."
STOP
End If
Set Sessions = System.Sessions
If (Sessions is Nothing) Then
Msgbox "Não pôde criar o objeto de coleção Sessions."
STOP
End If
Set Sess0 = System.ActiveSession
If (Sess0 is Nothing) Then
Msgbox "Não pôde criar o objeto Session."
STOP
End If
criarSession = Sess0
End Function