Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting a particular session with multiple sessions open

Status
Not open for further replies.

TooNew777

Technical User
Sep 18, 2003
2
US
I am trying to select session 4, when 4 sessions are open on a machine. What I did was to record a macro and save it, jumping from one session to another to see how Extra Basic identified the different sessions. Every thing works, until I try to add this in:

SessName0$ = "SESSION4.EDP"

When I try to declare SessName0$ it acts as if it is a keyword. Is this because of the $ on the end. This was the expression Etra recorded, when I went from one session to another. My idea was to be able to use a particular session. we use 4 sessions in our offices to work on the Host system.
Does anyone know if this is a system keyword?

TIA :)
gary robbins
 
In selecting a particular session, you need to first find the index of the session name you want. This might work:

Dim Sess0 As Object
For i = 1 to System.Sessions.Count
If System.Sessions.Item(i).Name = "SESSION4.EDP" then
Set Sess0 = System.Sessions.Item(i)
Exit For
End If
Next i

I'm not sure if this answers your question directly, but it should get you on the right track.

calculus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top