View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Keith Willshaw Keith Willshaw is offline
external usenet poster
 
Posts: 170
Default selecting txt before a, or return character?


"neowok " wrote in message
...
done some more testing and its now clear that the carriage return that
is in the oval is not the same as a 'vbnewline' so basically its not
picking it up, which is whats causing the error.

there must be another way to detect a return character other than
looking for vbnewline?

thanks


You can look for the specific character using its ascii code
typically 10 for CR or 13 for NewLine using the INSTR function

If Instr(0, SearchString, chr(10)) <0 Then
msgbox "New Line Found"
Endif

Keith