View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andrew[_16_] Andrew[_16_] is offline
external usenet poster
 
Posts: 66
Default Source of value passed to class object

Does anyone know of an elegant way to determine the source of a value
passed to an object via Property Let? - ie. which object called the
prop. let (or was it called from a std module)?

So far the best approach I can think of is to pass the value by
raising an event (instead of going via property let). Object2 can
then trap the event and store both the value and source internally.
This would work but seems a bit inefficient.

Alternatively, I had thought I could create a custom type variable
with elements .Value & .Source but this gives an error when I use it
in my property let statement. (incidentally Property Get Number() As
CustomType works fine but that's only half the story).

Getting even less elegant I could store and retrieve the source via a
global variable or by adding a fixed constant to the value for
specific object types.

Maybe there is another trick to this that I am missing??

Thanks alot,
Andrew