|
-
Feb 24th, 2000, 01:14 AM
#1
Is there something special you have to do to pass a variable of user defined type?
thanks
-
Feb 24th, 2000, 01:21 AM
#2
Take an account that User Defined Type cannot be passed ByVal.
-
Feb 24th, 2000, 01:41 AM
#3
i still get "type mismatch" error
here is my call:
LoadMemory (smlProg)
and here is my function:
Private Function LoadMemory(ByRef smlProg As SML)
End Function
keep in mind my user defined type is called SML
thanks
-
Feb 24th, 2000, 02:12 AM
#4
I've tried to recreate your function and it is working propertly. Here's an example:
Code:
Private Type SML
strTemp As String
intTemp As Integer
End Type
Private Function LoadMemory(ByRef smlProg As SML)
smlProg.intTemp = 5
MsgBox smlProg.intTemp
End Function
Private Sub Command1_Click()
Dim utTemp As SML
Call LoadMemory(utTemp)
End Sub
-
Feb 24th, 2000, 05:34 AM
#5
that worked. I guess it was the call loadmemory. and the fact i wanted to send it and return it by value. lesson learned. thanks.
on another note, i could send a normal variable byRef correct?
-
Feb 24th, 2000, 06:09 AM
#6
For a simple variable you can send it either ByRef or ByVal.
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
|