John Holifield
January 7th, 2000, 05:16 PM
Hello,
Can someone please tell me if it is possible to add a User Defined Type to a collection in Visual Basic 5? From what I've read in the Books online, this is possible, but I can't seem to get it to compile correctly. The compiler keeps saying "ByRef Argument Type Mismatch" at the line where I am trying to .Add to the collection.
For example:
private Sub AddTUFEditError(nseverity as Long, nField as Long, strMessage as string)
Dim theError as TUFEditError
theError.Severity = nseverity
theError.FieldNum = nField
theError.ErrorMessage = strMessage
TUFEditErrorCollection.Add theError 'ERR!
End Sub
Please forgive me if this is a stupid question, but I can't figure out how to make this work, and this one detail is holding my project up.
Please if anyone knows of a way around this problem, post the solution or e-mail me.
Thanks,
John Holifield
jdholifield@hotmail.com
jholifield@sungard.com
Can someone please tell me if it is possible to add a User Defined Type to a collection in Visual Basic 5? From what I've read in the Books online, this is possible, but I can't seem to get it to compile correctly. The compiler keeps saying "ByRef Argument Type Mismatch" at the line where I am trying to .Add to the collection.
For example:
private Sub AddTUFEditError(nseverity as Long, nField as Long, strMessage as string)
Dim theError as TUFEditError
theError.Severity = nseverity
theError.FieldNum = nField
theError.ErrorMessage = strMessage
TUFEditErrorCollection.Add theError 'ERR!
End Sub
Please forgive me if this is a stupid question, but I can't figure out how to make this work, and this one detail is holding my project up.
Please if anyone knows of a way around this problem, post the solution or e-mail me.
Thanks,
John Holifield
jdholifield@hotmail.com
jholifield@sungard.com