|
-
Jul 13th, 2003, 11:37 AM
#1
Thread Starter
Lively Member
filling an array with a function
im making a function that should fill in an array of string
ive declared it as such:
Code:
function func (byref reminders() as string)
and i used it like this:
Code:
dim rem() as string
func(rem)
but the compiler says:
"type mismatch: array or user defined type expected"
what am i doing wrong here?
-
Jul 13th, 2003, 11:39 AM
#2
Try either...
Call func(rem)
or
func rem
And see if it works.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jul 13th, 2003, 11:46 AM
#3
Thread Starter
Lively Member
thanks, calling it :
func rem
did the job, but now i got another problem with this function...
the line
reminders(0)="text"
causes it to say subscription out of range...
any ideas?
-
Jul 13th, 2003, 11:48 AM
#4
You are passing in an uninitialized array. You need to ReDim it to have at least one element in order to use it.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
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
|