Re: How to pass a 2-D array into a function?
- From: Gman <nah>
- Date: Mon, 14 Nov 2005 19:32:21 -0600
You can't have an array as an argument - you have to use a variant e.g.
Function GetNewValue(strVal As String, mBcdeptID As Variant) As Boolean if isarray(mBcdeptID) then msgbox mBcdeptID(0)
End Function
HTH, Gman
Andrew wrote:
Hello, friends,
I have a 2-D array:
Dim bcdeptID(24, 99) As Integer
Now I need to pass it into a function defined as:
Function GetNewValue(strVal As String, mBcdeptID() As Integer) As Boolean
where mBcdeptID() is a 1-D array. However, when I programmed as:
If GetNewValue(strVal, bcdeptID(0)) = True Then
I got an error, saying wrong number of dimension.
Then I tried GetNewValue(strVal, bcdeptID(0, 0)) , but still no luck.
Help please...
Thanks a lot.
.
- Follow-Ups:
- Re: How to pass a 2-D array into a function?
- From: Michael C
- Re: How to pass a 2-D array into a function?
- From: Dmitriy Antonov
- Re: How to pass a 2-D array into a function?
- Prev by Date: MSForms in VB6.0 Project - Cannot Quit
- Next by Date: Re: How to pass a 2-D array into a function?
- Previous by thread: MSForms in VB6.0 Project - Cannot Quit
- Next by thread: Re: How to pass a 2-D array into a function?
- Index(es):
Relevant Pages
|
Loading