Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This function...
Function Range4(R1 As Integer, C1 As Integer, R2 As Integer, C2 As Integer) As Range Set Range4 = Range(Cells(R1, C1), Cells(R2, C2)) End Function .... works fine through the assignment to Range4 (gets the correct range), but hangs at the End Funciton line with Run-time error '91': Object variable or With block variable not set What am I doing wrong? I've tried: adding "ActiveSheet." to everything; an auxilliary Range variable; searching this group. Thanks. --David. PS: Anybody know a better way to construct a simple rectangular range using numeric arguments rather than string addresses. But I'd still like to know why this function fails. It fails even if I assign a very simple range to Range4, like ActiveCell. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF(AND(OR function returns #VALUE! error | Excel Worksheet Functions | |||
LINEST() function returns error. | Excel Discussion (Misc queries) | |||
Find function returns the #VALUE! error value | Excel Discussion (Misc queries) | |||
AVERAGE function returns #DIV/0! error | Excel Discussion (Misc queries) | |||
Named range returns 1004 error | Excel Programming |