Barb,
Seems to work OK here (Excel 2002). I have cell A1 named PlanYear, and it
contains 0. When I run the code I get this in the Immediate window:
1
PlanYear1
Range Value = 0
If I put 55 in A1, I get:
1
PlanYear1
Range Value = 55
I'm confused by "The definition shows =0." Seems to me the definition of
the range name should show the cell address, regardless of its contents at
the moment. Have I misunderstood?
--
Earl Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
"Barb Reinhardt" wrote in message
...
I have the following code:
Debug.Print ActiveCell.Offset(0, 1).Value
sRangeName = "PlanYear" & ActiveCell.Offset(0, 1).Value
Debug.Print sRangeName
Debug.Print "Range Value = ", Range(sRangeName).Value
ActiveCell.Offset(0,1).value = 1
the range name "PlanYear1" has a value of zero right now. The
definition
shows
=0
at this point in time.
AWS is the activesheet.
sRangeName is a string.
WHAT am I missing?
Thanks