Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All:
I am attempting to pass a cell such as $C10 into a function. Inside the function, I have the following code: Dim Rng1 as Range Set Rng1 = Range("$C10") This code segment works. Now, if I attempt to pass a named cell into the code, it compiles but gives the following error message when "Watched". <Expression not defined in context Type = Empty Dim Rng1 as Range Set Rng1 = Range(NamedCell) Any suggestions? Thanks in advance. Cheers. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Set Rng1 = Range(NamedCell) must be: Set Rng1 = Range("NamedCell") HTH "Floyd" wrote in message oups.com... All: I am attempting to pass a cell such as $C10 into a function. Inside the function, I have the following code: Dim Rng1 as Range Set Rng1 = Range("$C10") This code segment works. Now, if I attempt to pass a named cell into the code, it compiles but gives the following error message when "Watched". <Expression not defined in context Type = Empty Dim Rng1 as Range Set Rng1 = Range(NamedCell) Any suggestions? Thanks in advance. Cheers. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mr. May,
I apologize. The range itself is not names. It is being passed as reference with the name, NamedCell. For example, Function Testing(NamedCell as range) Thanks so much for your assistance. Cheers. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Set Rng1 =NamedCell
tim "Floyd" wrote in message ps.com... Mr. May, I apologize. The range itself is not names. It is being passed as reference with the name, NamedCell. For example, Function Testing(NamedCell as range) Thanks so much for your assistance. Cheers. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mr. Williams,
That worked perfectly. Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing a range name as an argument to the Index Function | Excel Discussion (Misc queries) | |||
Passing a range to a user defined function | Excel Discussion (Misc queries) | |||
Passing range as an argument in a function | Excel Programming | |||
Passing a Range to a Function Problem | Excel Programming | |||
Passing an unkown range to a function | Excel Programming |