The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
You will find the Sub procedure as one included with the Browser control... just cute the code out from the middle, and your set to go! Rename variables as necessary.
Private Sub brwWebBrowser_BeforeNaviga
'Checks to see what type of URL they are going to
If UCase$(Left$(URL, 4)) = "HTTP" Then
Exit Sub
ElseIf UCase$(Left$(URL, 3)) = "FTP" Then
Exit Sub
ElseIf UCase$(Left$(URL, 6)) = "TELNET" Then
'Lets them know Telnet Not Allowed
Response = MsgBox("Telnet Not Allowed", vbOKOnly, "Sorry")
If Response = vbOK Then
'Cancels navigation to Telnet session
Cancel = True
End If
Else
Exit Sub
End If
End Sub