|
-
Oct 19th, 2000, 07:01 AM
#2
Junior Member
Yes you can. Try this:
You can pass an array into the function as byref. See following code:
Public Function SomeFunc(ByRef SomeArray)
ReDim SomeArray(1)
SomeArray(0) = "Item 1"
SomeArray(1) = "Item 2"
End Function
Private Sub Command1_Click()
Dim SomeArray() 'Sets a dynamic variant array
Dim FuncReturn 'Dimension to get function return
FuncReturn = SomeFunc(SomeArray)
List1.AddItem SomeArray(0)
List1.AddItem SomeArray(1)
End Sub
To test this create a form and put a command button and a list view on it then paste the code into the form.
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
|