Help with If statments

M

mattc66

I have the following code and its working okay with one exception. I would
like to add a MsgBox if the stFrt is not one of the if statements. Also I am
not sure if I should be formating this using a Select Case vs IF.

See below Code:

Private Sub TrackingNum_dblClick(Cancel As Integer)

Dim stFrt As String
Dim stPro As String
Dim stHyp As String

stFrt = Me.Carrier
stPro = Me.TrackingNum

If stFrt = "YFT" Then
stHyp = "http://www.myyellow............
If stFrt = "YEL" Then
stHyp = "http://www.myyellow.com/.......
If stFrt = "UPS" Then
stHyp = "http://wwwapps.ups.com/........
If stFrt = "RWY" Then
stHyp = "http://www.quiktrak.roadway.......
If stFrt = "RDW" Then
stHyp = "http://www.quiktrak.roadway.......

Msgbox "Carrier Not Linked", vbInformation, "Carrier Not Found"

End If
End If
End If
End If
End If
 
Top