VB Code:
  1. Dim strString5 As String
  2.     Winsock1(Index).GetData strString5
  3.     If Not CheckUsrBan(strString5) Then
  4.         Winsock1(Index).SendData "blahno"
  5.     ElseIf CheckUsrBan(strString5) Then
  6.         Winsock1(Index).SendData "blahyes"
  7.     End If
And "CheckUsrBan" function:
VB Code:
  1. Private Function CheckUsrBan(ByVal pstruser As String) As Boolean
  2.     Open_dbcon
  3.     Set cmdCommand = New ADODB.Command
  4.     With cmdCommand
  5.         Set .ActiveConnection = dbcon
  6.         .CommandType = adCmdText
  7.         .CommandText = "SELECT COUNT(*) AS Total FROM roguespear_ban WHERE user = '" & pstruser & "' "
  8.         Set adoRec = .Execute
  9.         CheckUsrBan = (adoRec.Fields.Item("Total").Value > 0)
  10.         Set adoRec = Nothing
  11.     End With
  12.     Set cmdCommand = Nothing
  13.     Close_dbcon
  14. End Function
Anyone see a reason why either of those would error "Subscript out of range" ?