Convert array

  • Thread starter Thread starter Daniel Köster
  • Start date Start date
D

Daniel Köster

Hi,

Is there anyone who can help me with this?
I need to convert the contents of an array to an ordinary variable.
Example,

Array (tjo:tji:tjapp...)

Variable = "tjo,tji,tjapp"

Thanks in advance!

BR
Daniel

--
--------------------------------------------------------
Daniel Köster
TEKNOTRANS AB
Redegatan 13
426 77 Västra Frölunda
Sweden
Tel: +46 31 69 47 60
Fax: +46 31 69 47 65
E-mail: (e-mail address removed)
http://www.teknotrans.com
 
Hi Daniel

If you have Excel 2000 or later,
you can use the "JOIN" function:


Sub Test()
'Leo Heuser, 24 Sept. 2003
Dim ArrayString As Variant
Dim CheckArray As Variant

CheckArray = Array("one", "two", "three")
' Or CheckArray = Array(1, 2, 3)

ArrayString = Join(CheckArray, ",")

MsgBox ArrayString
End Sub



--
Best Regards
Leo Heuser
MVP Excel

Followup to newsgroup only please.
 
Great! Thank you!

Best regards
Daniel
Leo Heuser said:
Hi Daniel

If you have Excel 2000 or later,
you can use the "JOIN" function:


Sub Test()
'Leo Heuser, 24 Sept. 2003
Dim ArrayString As Variant
Dim CheckArray As Variant

CheckArray = Array("one", "two", "three")
' Or CheckArray = Array(1, 2, 3)

ArrayString = Join(CheckArray, ",")

MsgBox ArrayString
End Sub



--
Best Regards
Leo Heuser
MVP Excel

Followup to newsgroup only please.
 
Back
Top