Skip to Content
author's profile photo Former Member
Former Member

How to count the number of open sessions

Hi Guys,

how can I Count the numer of (open) sessions?

I tried several approaches but nothing worked

(I also haven't found any discussion about this)

thanks

bw

Michael

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 14, 2015 at 08:24 AM

    Hello Michael,

    you can count the number of sessions with

    Connection.Children.Count

    Cheers

    Stefan

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Michael,

      to count the open session windows, which means the windows that are not iconified, you can try this:

      OpenWin = 0

      For i = 0 To connection.children.count - 1

      Set session = Connection.Children(CInt(i))

      If session.busy = false Then

      Set window = session.activewindow

      If window.iconic = false Then

      OpenWin = OpenWin + 1

      End If

      End If

      Next

      MsgBox OpenWin

      Let us know your results.

      Cheers

      Stefan

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2015 at 02:58 PM

    Thank you very very much for the quick respone to all of you

    thanks

    br

    Michael

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.