I need to find any instance of Yandex regardless of case in "AffAgent" which is the user agent. Did some Googling and came up with the following but I don't think it's working.
Dim AffAgent : AffAgent = Request.ServerVariables("HTTP_USER_AGENT")
If InStr(1, AffAgent, "Yandex", VBTextCompare) > 0 Then
Do something
End If