Thread
:
Names.Add - compile error
View Single Post
#
1
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Names.Add - compile error
try this.
Sub makename()
ma = ActiveCell.Address
ActiveWorkbook.Names.Add Name:="base", RefersTo:= _
"=OFFSET(" & ma & ",COUNTA($a$2:$a$6000),6)"
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Eric @ BP-EVV" wrote in message
...
Can anyone tell me what's wrong with the following statement that is
preventing my VBA code from compiling ?
Names.Add(Name:="Base",
RefersTo:=ActiveCell.Offset(WorksheetFunction.Coun tA("$a$2:$a$60000"),6 as
range)
Thank !
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett