• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1119
  • Last Modified:

VB6 split string

 I have string contain the char "-", how do I split the string by char into two strings
  • 2
1 Solution
Guy Hengel [angelIII / a3]Billing EngineerCommented:
dim arr() as string
arr = split(yourstring, "-")
Guy Hengel [angelIII / a3]Billing EngineerCommented:
and after that, arr(0) contains the part before the "-", and arr(1) the part after the "-"

if there are more "-" in the string, arr will have more array items also.
check out with lbound(arr) and ubound(arr) to see how many items there are in the array.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now