PC Review


Reply
Thread Tools Rate Thread

how do I join multi dimentional arrays

 
 
MK
Guest
Posts: n/a
 
      7th Jan 2009
I am trying to Join a 2 dimensional array into a string with comas as
deliminators in VB on excel... ie. mystring=join(multiarry)

multiarry being a 2 dimentional array

 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      7th Jan 2009
Hi

See this example:

Sub JoinData()
Dim MyArray(1 To 2, 1 To 10)
Dim MyString As String

For r = 1 To 2
For c = 1 To 10
MyArray(r, c) = r * c
Next
Next

For c = LBound(MyArray, 1) To UBound(MyArray, 1)
For r = LBound(MyArray, 2) To UBound(MyArray, 2)
If MyString = "" Then
MyString = MyArray(c, r)
Else
MyString = MyString & ", " & MyArray(c, r)
End If
Next
Next
Debug.Print MyString
End Sub

Hopes it helps

Per

"MK" <(E-Mail Removed)> skrev i meddelelsen
news43547CC-0A3A-49CD-AFD5-(E-Mail Removed)...
>I am trying to Join a 2 dimensional array into a string with comas as
> deliminators in VB on excel... ie. mystring=join(multiarry)
>
> multiarry being a 2 dimentional array
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-Dimentional Control Arrays And A Problem Douglas E. Rasmusen Microsoft VB .NET 8 19th Feb 2011 06:17 PM
Visualizing multi-dimentional arrays rsine Microsoft Dot NET Framework Forms 1 2nd Mar 2006 08:18 PM
Two Dimentional Arrays =?Utf-8?B?S3VyaWVuIEJha2VyIEZlbm4=?= Microsoft Dot NET 1 6th Oct 2004 02:06 PM
Re: Populate a multi Dimentional Array sarge Microsoft VC .NET 0 14th Jun 2004 09:05 PM
Populate a multi Dimentional Array rkmoray Microsoft VC .NET 0 14th Jun 2004 09:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:16 AM.