By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,053 Members | 1,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,053 IT Pros & Developers. It's quick & easy.

split function in vb 6.0

P: 11
hi
in vb 6.0 ,iam using space in split function. that is working fine.

Split(str, " ")

now i want 2 use tab. bcoz in the text file the delimiter they are using is tab. so i want 2 use tab for split funcion. i dont know abut that . can anyone help me .

2 4 6 7 -- like this the data is available.

regards

vivek
Nov 2 '06 #1
Share this Question
Share on Google+
4 Replies


100+
P: 1,646
hi
in vb 6.0 ,iam using space in split function. that is working fine.

Split(str, " ")

now i want 2 use tab. bcoz in the text file the delimiter they are using is tab. so i want 2 use tab for split funcion. i dont know abut that . can anyone help me .

2 4 6 7 -- like this the data is available.

regards

vivek
Hi, you will need to consider the tab as a number of spaces e.g. 4 spaces and use the split function like that Split(str, " ")
Nov 2 '06 #2

Andrew Thackray
P: 76
try

Expand|Select|Wrap|Line Numbers
  1.  
  2. Split(str,chr(9))
  3.  
  4.  
ascii chr 9 is the tabl character.
Nov 3 '06 #3

Expert 5K+
P: 8,434
try
Expand|Select|Wrap|Line Numbers
  1. Split(str,chr(9))
ascii chr 9 is the tabl character.
You can also use the constant vbTab - it provides the same value, and doesn't require you to execute the Chr() function all the time. In other words...
Expand|Select|Wrap|Line Numbers
  1. Split(str,vbTab)
Nov 5 '06 #4

P: 11
hi
thanks for the valuable information from urs. it helped me alot.

regards
vivek
Nov 8 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.