Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

function = array 1

Status
Not open for further replies.

imarosel

Technical User
Jun 23, 2005
149
US
Can't figure out how to call a function that returns an array in the VB within access. Is this possible?
 
A starting point:
Function getAnArray(strToParse As String, strDelimiter As String)
Dim a
a = Split(strToParse, strDelimiter)
If UBound(a) >= 0 Then getAnArray = a
End Function


Example of call in the debug window:
? getAnArray("1,2,34",",")(0)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Ok thanks, I am getting into trouble trying to dimension the the function. How would I work the following into the function?

Dim limitArray() As Variant
ReDim limitArray(numberCount, 2)

 
What do you want to do with what ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Ok, got it thanks to you. I can't redim the function, but I can redim an array and then set the function equal to that array. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top