LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default problem:Structure with Object reference (TYPE...END TYPE)

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
object on RHS when there is a type-mismatch [email protected] Excel Programming 0 October 12th 06 02:00 AM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
On-the-fly determination of object type? Ed Excel Programming 2 May 17th 05 08:37 PM
automation object type library reference Kevan Hanson Excel Programming 2 August 4th 04 02:29 AM
User Defined Type Structure - want it to be variable not numeric literal WyoCracker Excel Programming 1 July 21st 03 09:28 PM


All times are GMT +1. The time now is 09:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"