Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search string in VBA - How to ?

Status
Not open for further replies.

101287

MIS
Apr 8, 2006
189
US
Help...Guidance... Please
Problem:
String = 1234,4565,1034,5075
Would like to have code to search the above string and determine the numeric characters to the right of the string and then put then in a field and/or array. Search and store this fields until the string is complete read.

Can someone provide me an example on how to accomplish this? I don't have enough experience in VBA to address the above problem.

Guidance and help will be appreciated.
 




Hi,
Code:
dim a, s as string, i as integer
s = "1234,4565,1034,5075"
a = split(s, ",")
for i = 0 to ubound(a)
  msgbox a(i)
next

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top