|
-
Sep 9th, 2004, 04:00 PM
#1
Thread Starter
Frenzied Member
read values from multi-dimensional array
I am reading registry values, which are returned in a multi-dimensional array.
I can debug.print to see the values just fine, but what I would like to do is add these values to a comma delimited string.
Any ideas how I can do this?
Here's the code
VB Code:
If Len(mstrSystem) <> 0 Then
strRegSettings = GetAllSettings(mstrSystem, "Options")
For i = LBound(strRegSettings, 1) To UBound(strRegSettings, 1)
Debug.Print strSettings(i, 0), strSettings(i, 1)
Next i
End If
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Sep 9th, 2004, 04:10 PM
#2
Can't you just loop through them adding each one to a string, and adding a comma after them?
That's too simple, so I guess I don't understand the question.
-
Sep 9th, 2004, 04:12 PM
#3
Thread Starter
Frenzied Member
I guess I just overlooked the obvious. I just did this...
VB Code:
Dim i As Integer
Dim a As Integer
For i = LBound(strRegSettings, 1) To UBound(strRegSettings, 1)
For a = 0 To UBound(strRegSettings, 1)
strSettings = strSettings & strRegSettings(i, a) & ","
Next a
Next i
MsgBox strSettings
Last edited by Memnoch1207; Sep 9th, 2004 at 04:36 PM.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Sep 9th, 2004, 04:13 PM
#4
PowerPoster
since i took the trouble (albeit small) to code it Ill post even though you found a solution:
VB Code:
Public Function CSV3(a() As String)
Dim i As Integer, j As Integer, k As Integer
CSV3 = ""
For i = LBound(a, 1) To UBound(a, 1)
For j = LBound(a, 2) To UBound(a, 2)
For k = LBound(a, 3) To UBound(a, 3)
CSV3 = CSV3 & a(i, j, k) & ","
Next
Next
Next
End Function
-
Sep 9th, 2004, 04:13 PM
#5
That's what I was thinking....though to make a comma delimitted string, I would tend to separate the values with commas.
-
Sep 9th, 2004, 04:14 PM
#6
Damn, too slow again! My reply was to Memnoch, not Muddy.
-
Sep 9th, 2004, 04:18 PM
#7
PowerPoster
yeah... too bad the forums dont have a slide sorter function like Powerpoint :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|