Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Instancing class


Message #1 by "Jawahar Rajan" <jrajan@h...> on Sat, 08 Feb 2003 10:18:27 -0500
jawahar,

Your UDT includes "srtResValue as value". value is not a VB type, so where 
is it defined. This may be part of your problem. You want to make sure 
that it is available to the calling app.

Also make sure that in your calling app, you are dimming your UDT as 
vLookup.Results. You do not want to redefine the UDT. (You may already be 
doing this.)

> 

All,
I have a vb project as anactiveX Dll called vLookUp and in the project  a 
class called cLookUp
I create an instance of this class as follows in another project.
dim clsLookup as New vLookUp.cLookUpI am trying to use a function in 
cLookup called LookUp that returns a user defined type
Hence when use this function LookUp I do so as follows
dim RetVal as used defined type (same as the one returned by LookUp)
RetVal = clsLookUp.LookUp()
But i get an error saying that the "object does not support this property 
or method"
Is there a problem accepting as return from a fuction that is a user 
defined type.
My user defiend type is 
Public type Results
strResName as string
srtResValue as value
end type
I declare dim RetVal  as Results, yet I get an errors as above.
Any help is apreciated.
THx

jawahar

Tired of spam? Get advanced junk mail protection with MSN 8.

  Return to Index