Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assigning a constant to a range name
In XL2003 on XP, I want to assign a constant to a range name, but it's not
working the way I expect. My test case: Sub test() Dim i As Single i = 0.05 'result of some procedure ' Obviously this works ActiveWorkbook.Names.Add Name:="Rate", RefersToR1C1:="=Names!R1C1" Range("A1") = i MsgBox Range("Rate") ' This assigns the value and I can use it on the worksheet, but why can't I read it back? ActiveWorkbook.Names.Add Name:="IntRate", RefersToR1C1:=i MsgBox Range("IntRate") End Sub Can someone explain this? -- Al C |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combine a range with a constant number | Excel Programming | |||
range * constant | Excel Programming | |||
Multiply a Range by a Constant | Excel Programming | |||
Assigning a Range to | Excel Programming | |||
Selecting a constant changing Range | Excel Programming |