Mike Eghtebas
asked on
Dynamic Array in VB 2008
This works in VB 6:
Partner() As String
Sub ReDimArray()
ReDim Partner(0) As String
Partner(0) = "Jaes"
MsgBox Partner(0) '<-- returns "Jaes"
ReDim Preserve Partner(1) As String
Partner(1) = "Mike" '<-- returns "Jaes"
'etc
End Sub
How is this done in VB 2008
Thank you.
Partner() As String
Sub ReDimArray()
ReDim Partner(0) As String
Partner(0) = "Jaes"
MsgBox Partner(0) '<-- returns "Jaes"
ReDim Preserve Partner(1) As String
Partner(1) = "Mike" '<-- returns "Jaes"
'etc
End Sub
How is this done in VB 2008
Thank you.
This works in vb 2008:
Dim Partner() As String
Sub ReDimArray()
ReDim Partner(0)
Partner(0) = "Jaes"
MsgBox(Partner(0)) '<-- returns "Jaes"
ReDim Preserve Partner(1)
Partner(1) = "Mike" '<-- returns "Jaes"
'etc
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Idle_Mind,
Your solution is the best practice and very much appreciated.
Hi Zhaolai,
Thank you for your post. I was looking for 2008-specific solution like what Idle_Mind has posted.
Thank you
Your solution is the best practice and very much appreciated.
Hi Zhaolai,
Thank you for your post. I was looking for 2008-specific solution like what Idle_Mind has posted.
Thank you
ASKER
EYoung,
My apology for not paying a good attention of your post. I will request to reopen the question and give your fair share.
Thank you,
Mike
My apology for not paying a good attention of your post. I will request to reopen the question and give your fair share.
Thank you,
Mike
http://weblogs.asp.net/eporter/archive/2003/08/07/22943.aspx