View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ALEX ALEX is offline
external usenet poster
 
Posts: 493
Default cell name - macro

Hello,

I wrote this macro to name a cell:

caddress = ActiveCell.Address
cursheetname = ActiveSheet.Name
ActiveSheet.Names.Add Name:="LAST", RefersToR1C1:="=cursheetname!caddress"

it does not work. anybody can help ?
thanks.

==
this also does not work:

ActiveSheet.Names.Add Name:="LAST",
RefersToR1C1:="=cursheetname!address(ReferenceStyl e:=xlR1C1)"