Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Defining Names
Hi All,
I have a listing i'd like to give a name. As the listing has a heading, i cant use the currentregion option when defining the name. I.e. No. SuppN SuppNo 1 ABBCD 10012 2 HJUTH 2704 etc etc The listing itself is currently selected (no headings included). 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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I use 'names' in defining a series in a graph | Charts and Charting in Excel | |||
defining names in a macro | Excel Discussion (Misc queries) | |||
Help with defining names | Excel Worksheet Functions | |||
Defining Regions with Names | Excel Discussion (Misc queries) | |||
Defining Names in Excel | Excel Worksheet Functions |