Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default seprate and store string in arrays

use the VBA split function.

DM Unseen

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
To store the formula in a string pol Excel Discussion (Misc queries) 4 December 2nd 08 02:14 PM
Can one store a string in a Array element? [email protected] Excel Discussion (Misc queries) 1 April 17th 07 12:53 PM
Retrieving data from Excel and store it into string variable marsulein[_5_] Excel Programming 1 November 10th 04 01:43 AM
Retrieving data from Excel and store it into string variable marsulein[_4_] Excel Programming 1 November 9th 04 09:35 AM


All times are GMT +1. The time now is 10:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"