Thread: Macro Recording
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter Atherton[_3_] Peter Atherton[_3_] is offline
external usenet poster
 
Posts: 11
Default Macro Recording

Paul

Its just the way Excel works. R1C1 is the active cell and
Excel refers to it in RC notation. Heres one I recorded

Sub Macro1()
' Macro1 Macro
' Macro recorded 01/05/2004 by Peter Atherton

Range("B16:B20").Select
ActiveWorkbook.Names.Add Name:="Rng", _
RefersToR1C1:="=Sheet4!R16C2:R20C2"
End Sub

Note when the range is selected first the AlphaNumeric
notation is used. Normally you would not record a one off
event like createing a range name but you might want to
refer to it later. The sub below selects the name just
created.

Sub Selct()
[rng].Select
End Sub

Regards
Peter
-----Original Message-----
Can anyone explain why when I record a macro which names

a range, the macro
records

ActiveWorkbook.Names.Add Name:="New NamedRange",

RefersToR1C1:= _
"='Cricket Shirts'!R1C1:R26C5"

I am not aware of any setting that tells it to record in

RowColumn notation,
I certainly do not have that option ticked in Options |

General.

Can anyone explain why the address of the range is not in

normal alpha
numeric notations.

PWS


.