Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All objects of any type (including Range) need to be set first. (as I showed
you in my code). -- Regards, Tom Ogilvy "syswizard" wrote: Thanks guys for the help...just when I thought I was getting good at this.....NOT !! Strangely, I scoured the entire net look for someone who had used an object within a TYPE using Excel. None, nada, zip to be found. As an interesting aside, when you have an object within a TYPE structure, you cannot reference it directly from the structure. It must be "set" first. Assuming TD is the structure reference. Dim xRange As Range Set xRange = TD.TestRange dTotal = dTotal + TD.TestRange.Cells.Offset(ix).Value <= Fails !!! dTotal = dTotal + xRange.Cells.Offset(ix).Value <= Works Fine !!! I wonder if that would not be the case had I used a RANGE in the structure instead of OBJECT ? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
object on RHS when there is a type-mismatch | Excel Programming | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming | |||
On-the-fly determination of object type? | Excel Programming | |||
automation object type library reference | Excel Programming | |||
User Defined Type Structure - want it to be variable not numeric literal | Excel Programming |