Barry,
I just did the following test:
1. Created new sample project
2. Added a module called Module1
3. Created a property in Module1 with the Declaration: MyArray(-1,-1) As
String
4. Created a Method in Module1 called PopulateMyArray and added the
following code:
Redim MyArray(1,1)
MyArray(0,0) = "Row 0, Column 0"
MyArray(1,0) = "Row 1, Column 0"
MyArray(0,1) = "Row 0, Column 1"
MyArray(1,1) = "Row 1, Column 1"
5. Added ListBox1 to Window1 and put the following code in Window1's
Open Event:
Dim i,n As Integer
PopulateMyArray
ListBox1.DeleteAllRows
For i = 0 To 1
For n = 0 To 1
ListBox1.AddRow ""
ListBox1.Cell(i,n) = MyArray(i,n)
Next
Next
This compiles and runs just fine and populates the ListBox just fine so
I do not understand why you can't get MyArray(-1,-1) to work and why it
gives you syntax errors.
Tom
>
> Jack,,
>
> > Declaration: MyArray(m,n)
> > As: string
>
> I thought this would work, but RB 2005, Release 4, for
> Windows doesn't like it when it tries to compile the program.
> It highlight the "m" in yellow, and tells me that it doesn't
> exist <sigh>.
>
> Any suggestions? (I even tried making Properties of "m" and
> "n," but RB doesn't like that either. I also tried the "m as
> integer, n as integer"
> approach in the Declaration.)
>
> Barry Traver
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>