![]() |
seprate and store string in arrays
i receive the string through txtbox= "jack;dave;john" In above string there are 3 names seprated by 2 semicolon I want to store names in array and display msgbox saying... array="jack" msgbox (array) array="dave" msgbox (array) array="john" msgbox (array) plz note: string names can be in any numbers seprated by column. Also it can be only one name with no semicolon. -- ilyaskazi ------------------------------------------------------------------------ ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969 View this thread: http://www.excelforum.com/showthread...hreadid=383041 |
seprate and store string in arrays
If you are on xl200 or later Code: -------------------- Dim x x=split("jack;dave;john",";") msgbox Join(x,vbLf) -------------------- -- jindon ------------------------------------------------------------------------ jindon's Profile: http://www.excelforum.com/member.php...o&userid=13135 View this thread: http://www.excelforum.com/showthread...hreadid=383041 |
seprate and store string in arrays
no i don't want it to put in one msgbox. there should be each msgbox to display for each-n-every names seprated -- ilyaskaz ----------------------------------------------------------------------- ilyaskazi's Profile: http://www.excelforum.com/member.php...fo&userid=2396 View this thread: http://www.excelforum.com/showthread.php?threadid=38304 |
seprate and store string in arrays
use the VBA split function.
DM Unseen |
seprate and store string in arrays
Then Code: -------------------- Dim x,i x=split("jack;dave;john",";") For i = Lbound(x) To Ubound(x) msgbox x(i) Next -------------------- -- jindon ------------------------------------------------------------------------ jindon's Profile: http://www.excelforum.com/member.php...o&userid=13135 View this thread: http://www.excelforum.com/showthread...hreadid=383041 |
seprate and store string in arrays
thanku jindon, it is solved and working perfect.. :) -- ilyaskazi ------------------------------------------------------------------------ ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969 View this thread: http://www.excelforum.com/showthread...hreadid=383041 |
All times are GMT +1. The time now is 09:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com