Is is possible to set the backup hosts programmatically using VBA code?
I can set the current connection and port under code as follows but cant seem to find a way to set the backup hosts.
ThisIbmTerminal.HostAddress =
ThisIbmTerminal.port =
Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
If an answer to your question is correct, click on "Verify Answer" under the "More" button. The answer will now appear with a checkmark. Please be sure to always mark answers that resolve your issue as verified. Your fellow Community members will appreciate it!  Learn more
Is is possible to set the backup hosts programmatically using VBA code?
I can set the current connection and port under code as follows but cant seem to find a way to set the backup hosts.
ThisIbmTerminal.HostAddress =
ThisIbmTerminal.port =
Hi Stephen Morley,
There is no property for ThisIbmTerminal.BackupHostAddress in VBA. You can solve this by adding logic to your VBA code that waits to see if the first connection fails and then changes the value for ThisIbmTerminal.HostAddress to the secondary address you wish to attempt. The other option would be to call an existing session that is configured with a primary and backup host.
Regards,
Jeff B
HI Jeff B,
Thank you for the reply - appreciate it.
I had come to the same conclusion so thank you for the confirmation.
As a FYI I am setting the connection details as follows (in the BeforeConnect Event):-
Private Sub IbmTerminal_BeforeConnect(ByVal sender As Variant)
ThisIbmTerminal.HostAddress = ?
ThisIbmTerminal.port = ?
End Sub
The values for the ? come from a config file.
Can you please suggest how I can wait and see if the first connection fails and then change the address?
Thank you in advance.
Regards
Steve
Hi Steve,
You can use ThisIbmTerminal.IsConnected to find out if the connection was made. You may also want to customize the connection time out using ThisIbmTerminal.HostCommTimeout to shorten the amount of time (default 60 seconds) you have to wait for the first connection to fail.
Also note that ThisibmTermainal.Connect method has a return code that you can use in your logic.
Regards,
Jeff B