View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default TypeName of a UDT

Is your UDT declared in a general module as the error message indicates it
isn't.

--
Regards,
Tom Ogilvy


"Pflugs" wrote:

I created a UDT called VECTOR containing three doubles (i.e., x,y,z). I also
created a set of UDF's that I want to have inputs of either a range of 3
cells, an array of values (ints, longs, or doubles), or of my UDT VECTOR.
The problem is that I can't seem to get TypeName(VECTOR_variable) to return
VECTOR.

That is, I need something to quickly tell me that the input to this function
is my user defined type VECTOR. I am getting the error message that says:

"only user-defined types defined in public object modules can be coerced to
or from a variant or passed to late-bound functions"

How can I get around this? I don't know anything about class modules, and I
really don't want to get that in depth (yet).

Thanks,
Pflugs