Example

This procedure displays a message box with the host name immediately after a connection is made. Note: This procedure must be located in the code module for the ThisSession object.

Private Sub Session_AfterConnect()

 MsgBox "You are connected to " & Session.ConnectionSetting("host") & "."

End Sub