[SOLVED]
Here is the relevant section that now works as expected:
Code:
Select Case bConnected
Case True ' Connected
UserName = env("USERNAME")
UserProf = env("USERPROFILE")
objTab.Caption = strConnectType & strShortHostName
objTab.Session.SetStatusText("Connected: " & strConnectType & strShortHostName)
Call CLS
objTab.Session.Log False
objTab.Session.Config.SetOption "Custom Log Message Each Line", "%h:%m:%s | "
objTab.Session.LogFileName = UserProf & "\SecureCRT Logs\" & UserName & "\%Y-%M-%D.%h.%m - " & strShortHostName & " -- (" & UserName & ").log"
objTab.Session.LogUsingSessionOptions
Case False ' Not Connected
crt.Dialog.MessageBox "Try again later:" & vbCrLf & strShortHostName
End Select
This is what fixed it:
Code:
objTab.Session.LogUsingSessionOptions