Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I keep getting the dreaded "Runtime Error '91'....
Object Variable or With-block variable not set" Type RangeTestType TestCount As Long ' Cell Count TestRange As Object ' Range RefString variable stores a name. End Type Dim retval as RangeTestType Dim dataRange As Range Dim lCellcnt As Long Dim x as Object Set dataRange = Range("A1:" & "C" & ActiveSheet.Rows.Count) x = dataRange lCellcnt = dataRange.Cells.Count retval.TestCount = lCellcnt retval.TestRange = x <= THIS STATEMENT TRIGGERS ERROR When I replace the Object with "Range", I get the exact same error. Somehow, passing objects within a structure appear to be problematic.... any help greatly appreciated. (Excel 2003) |
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 |