Code to find a particular character in a string

SGT68

Registered User.
Local time
Today, 20:44
Joined
May 6, 2014
Messages
76
Hello All,

I've got a string variable with a value that could be typically

"ABCD|123|R"

The string needs to be split into its three parts, the pipe symbol being the separator. Then the middle numeric string must be converted back to a long

Forgetting the string to long conversion for moment cos i'm sure that will be straighforward, can anyone help me with the splitting part.

I know i could do a loop which identifies each character in turn, but my question is:

Is there a VBA function that can pick out the position in the string of the "|" characters, so i dont need a loop ?

Much appreciating the help this forum offers
 
Thank you very much. That looks like it'll do the job

SGT
 

Users who are viewing this thread

Back
Top Bottom