Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

    Hello Michael,

    you can count the number of sessions with

    Connection.Children.Count

    Cheers

    Stefan

    Add 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

  • avatar image
    Former Member
    Dec 14, 2015 at 02:58 PM

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

    thanks

    br

    Michael

    Add comment
    10|10000 characters needed characters exceeded