Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / May 2005



Tip: Looking for answers? Try searching our database.

Array of arrays Declaration

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ibrahima - 23 May 2005 09:50 GMT
Hello,

When declaring an array of array, let say:

dim arrTable()() as Variant

I get a message box:" Compile error, expected : end statement"
Thanks in advance for your support.
Ibrahima.
Norm Cook - 23 May 2005 14:29 GMT
Try this code:

Private Sub Form_Load()
Dim a(1 To 2) As Variant
Dim s1(1 To 5) As String
Dim s2(1 To 5) As String
Dim i As Long
For i = 1 To 5
 s1(i) = "StringArray1 Element " & i
 s2(i) = "StringArray2 Element " & i
Next
a(1) = s1
a(2) = s2
Debug.Print a(1)(1), a(1)(5)
Debug.Print a(2)(1), a(2)(5)
End Sub

> Hello,
>
[quoted text clipped - 5 lines]
> Thanks in advance for your support.
> Ibrahima.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.