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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need to break up 1 large string into 3 smaller strings 1

Status
Not open for further replies.

beetlebailey

Programmer
Jan 4, 2005
51
US
I have $(0) which = 987723605XXXA9347286
$(1) should always be 4 characters: 9877
$(2) should always be the next 8 characters: 23605XXX
$(3) should always be the last 8 characters: A9347286

Is anyone familiar on how to break this up and assign a string variable for each new string ?

Thanks for any and all comments.
 
str1 = Left$(str0,4)
str2 = Mid$(str0,5,8)
str3 = Right$(str0,4)

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Thanks, could you simply explain how this works ? I would like to understand what is happening. Thanks again.
 
For traditional (GWBasic etc) the help file can be found here:
- download the file gw-man.zip
If you're using VB or VBA just highlight the word in a code window and use F1

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top