Can some help me with a do...loop statement. The code below checks to see if internet connection is available. if not, msgbox is display asking if the user wants to try again. if the user clicks yes, it should check for internet connection. if the user clicks No, then the caption changes to "Close"
[VBA]If IsConnected = False Then
If MsgBox("Unable to detect an internet connection. Would you like to try again.", vbExclamation + vbYesNo, "PerDiem Traveler") = vbNo Then
cmdBuy.Caption = "Close"
Exit Sub
'else
'Check internet connection again
End If
[/VBA]