Michael,
You should be able to do this already:
oVol = createobject("clsVolatility")
? oVol.oDate.Volatility
Since your class definition already does the ADD OBJECT.
If you want to add the other class on the fly you can do this:
oVol = createobject("clsVolatility")
oVol.AddObject( "oDate", "clsDateRange" )
? oVol.oDate.Volatility
>If a custom class definition holds a reference to another custom class (using the "ADD OBJECT" command), how can I set that object reference from outside the class? So...
>
>oVol = createobject("clsVolatility")
>oDate = Createobject("clsDateRange")
>oVol.DateRange = oDate && Not working.
>
>
>
>***************************************
>DEFINE CLASS clsVolatility AS CUSTOM
>***************************************
>
> Volatility = 0
>
> ADD OBJECT DateRange AS clsDateRange
>
>ENDDEFINE
>
>
>***************************************
>DEFINE CLASS clsDateRange AS CUSTOM
>***************************************
>
> StartDate = {}
> EndDate = {}
>
>ENDDEFINE