?
Solved

"plucking" values from a string

Posted on 2003-03-07
6
Medium Priority
?
182 Views
Last Modified: 2010-05-01
I'm retrieving raw quote info from yahoo. The string looks like:

"S",19.93,"3/7/2003","1:18pm",+0.63,19.30,20.30,18.91,2973700

Anyone care to suggest a "quick % dirty" was to grab the second field?

Thanks


0
Comment
Question by:cwest1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 

Author Comment

by:cwest1
ID: 8090086
sorry for the typos. last line should be
Anyone care to suggest a "quick &dirty" way to grab the second field?
0
 
LVL 2

Expert Comment

by:keenez
ID: 8090100
use split to split the string.

x = split(str)
msgbox x(1)

The second field will element 1

Cheers,

keenez
0
 
LVL 2

Accepted Solution

by:
keenez earned 300 total points
ID: 8090107
Oops .... that should be
x = split(str, ",")
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:cwest1
ID: 8090237
but msgbox returns an out of range error!
0
 

Author Comment

by:cwest1
ID: 8090376
fixed by adding dim x. strange!
0
 

Expert Comment

by:TeleKawaru
ID: 8090457
MsgBox Mid(yahoo, InStr(1, yahoo, ",") + 1, Len(Left(yahoo, InStr(5, yahoo, ",", vbTextCompare))) - InStr(1, yahoo, ",") - 1)

Where yahoo is your string.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 8 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question