Defining Names
russell (skmr3) wrote:
Hi All,
<snip
Can anyone help me modify the below coding so the current
selection is defined?
ActiveWorkbook.Names.Add Name:="SuppTbl", _
RefersTo:=ActiveWorkbook.Worksheets("Supps").Selec tion
Thanks in advance.
Russell.
'Selection' is only available for the Application and Window objects.
Either:
ActiveWorkbook.Names.Add Name:="SuppTbl", _
RefersTo:=ActiveWindow.Selection
ActiveWorkbook.Names.Add Name:="SuppTbl", _
RefersTo:=Application.Selection
might suit your needs.
HTH,
Matthew Connor
|