Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range definition problem
I'm trying to pass a Range to a Function but it doesn't recognize it
-- it gives an 'object required' msg. If I set up a Watch on the Range, it says its type is Range/Range. The Range itself looks ok on the screen. Any ideas? Peter. Sub testMacro() Dim dataRange As Range Set dataRange = ActiveWorkbook.Sheets("Portfolio Performance"). _ Range(ActiveWorkbook.Sheets("Portfolio Performance").Cells(10, 1), _ ActiveWorkbook.Sheets("Portfolio Performance").Cells(20, 25)) dataRange.Interior.ColorIndex = 3 ' ok TestThisVariant (dataRange) ' ok TestThisRange (dataRange) ' object required End Sub Function TestThisRange(ByVal rRange As Range) As Boolean TestThisRange = True End Function Function TestThisVariant(vRange) End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Solver Problem Definition | Excel Worksheet Functions | |||
VBA Range definition: Code needed | Excel Discussion (Misc queries) | |||
How come this range definition is invalid? | Excel Programming | |||
variable range definition | Excel Programming | |||
Using Cells( ) for Range definition | Excel Programming |