How about this :
VB Code:
Public Sub HostConnect2() Dim EverythingOk As Boolean EverythingOk = True EverythingOk = InStr((GetSetting("DMcom", "Host", "name", "notfound") & GetSetting("DMcom", "Host", "ip", "notfound") & GetSetting("DMcom", "Host", "port", "notfound")), "notfound") = 0 If EverythingOk Then 'connect to server Else 'show screen to get settings from user. 'allow user to cancel connection from there, or try to connect again 'the connect option should then call this sub again End If End Sub




Reply With Quote