breaking up a string in VB
steveoo0oo
heres my prob...the user inputs some info from a text box (they are two coordinates ie 200, 500) what i need to do it break this number up, so that i can assign 2 variables, ie one that is 200 and the other 500 soooo basically the input is: 200, 500 and the output i want is: 200 and 500 each thier own value, without the comma in there at all....can anyone help with the code? or just type the code for me?
Posted 24 years ago (Thread Starter)
About steveoo0oo
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html,
social networking links, message board signature, company profile, etc.
Post ID #5449, 2 replies
Thread Started 3/4/2002 6:25:00 PM
View Counter=11626
Last Reply Posted 5/28/2010 8:28:29 AM)
Location=-- USA
Most Recent Post
Moderator
Mike Prestwood
Prestwood IT
Prestwood IT office in Citrus Heights, CA
Here's a little code snippet to demonstrate. Declare MyArray as an array, i as an integer, and pKeywords as a string.
pKeywords = "VB,OO,C#,Delphi" MyArray = Split(pKeywords, ",", -1, 1) If UBound(MyArray) > 0 Then For i = 0 to UBound(MyArray) '...do something with MyArray(i)... Next End If
Posted 16 years ago
About Mike Prestwood
Approved member.
Member subscribes to this thread with a verified email.
About Mike Prestwood
Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions . Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books . If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.
Web Presence
Facebook , Prestwood IT Facebook page -- fan page. (Visit Me )
Twitter , Follow Prestwood IT on Twitter. (Visit Me )
LinkedIn , Prestwood IT company page on LinkedIn. (Visit Me )
Post ID #14128 (Level 1.1)
Reply to 5449
Thread Started 5/28/2010 8:25:13 AM
Location=Prestwood IT office in Citrus Heights, CA
cheddar
you can either use instr to find the comma or split to create an array out of your string and read each array element.
Eric Neff C#, ASP.Net, SQL Server, Oracle
Posted 24 years ago
About cheddar
Approved member.
Member subscribes to this thread with a verified email.
Post ID #5478 (Level 1.2)
Reply to 5449
Reply Posted 3/7/2002 9:49:00 AM
Location=Lodi, CA
Revive Thread!
Add a comment to revive this old thread and make this archived thread more useful.
Thread #5449 Counter
11626
Since 4/2/2008