Sub Main()
Dim Sys As Object, Sess As Object
Set Sys = CreateObject("EXTRA.System")
' Assumes an open session
Set Sess = Sys.ActiveSession
if sess.WaitForDisconnect(10000) then
msgbox "Session became disconnected within the last 10 seconds!"
else
msgbox "Session took longer than 10 seconds to become disconnected!"
end if
End Sub