|
-
Mar 18th, 2004, 08:35 AM
#1
Thread Starter
Fanatic Member
MD Arrays
Hey All trying to do a multidimenison array but getting this error
An unhandled exception of type 'System.NullReferenceException' occurred in CompaniesHouseScanner.exe
Additional information: Object reference not set to an instance of an object.
Can you nice people help....
VB Code:
Dim KeyArray(,) As String
Dim i As Integer
KeyArray(0, 0) = ("Office :")
KeyArray(0, 1) = ("Status :")
KeyArray(1, 0) = ("status :")
KeyArray(1, 1) = ("Company No")
For i = 0 To 1
msgbox(KeyArray(i, 1))
next
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
-
Mar 18th, 2004, 09:42 AM
#2
Hi.
If you plan to fill the array manually as you do in your code, you have to set the size of the dimensions when declaring the variable.
e.g. Dim KeyArray(123,321) As String
Multidimensional arrays are not dynamic, and you can't use redim, so you would have to know the size before entering data.
Correct me if I'm wrong, folks...
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Mar 18th, 2004, 11:06 AM
#3
Thread Starter
Fanatic Member
RESOLVED
it was simply the case that i was defining the size of the array. I knew the size was going to be x so it was simply a case of redim KeyArray(10,1)
nice thanks for replying
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
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
|