Results 1 to 2 of 2

Thread: Pleaseeeee Help................

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    225
    How can I search through the MSComm control input for certain strings. For example I need to perform certain actions based on what I am recieving. In one instance I recieve "CONNECTED" (without the quotes) and as soon as it is recieved I need to send a carriage return. I need to search for several different strings at various times throughout the connection. Any help is greatly appriciated.

  2. #2
    Addicted Member
    Join Date
    Jun 1999
    Location
    Los Angeles
    Posts
    186
    Hi there,

    I assume that you know exactly what you are expecting, so this isn't too hard:

    Pos=Instr(1,StringToSearch,StringToSearchFor,vbBinaryCompare)

    If Pos<>0 then
    'The string you sought was found in the string you searched
    'Do wot you do here
    end if

    Get the idea?

    André

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width