Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding a line at the end of a macro to name the cell
Hi all,
I have a macro that i want to edit. At the end of my current macro, the cursor is pointed to a specific cell, but it varies in location everytime. What I would like to do is to add a line to my currrent macro and name the active cell that it's pointing to. I have something like ActiveWorkbook.Names.Add Name:="USAR", RefersToR1C1:="=AR10!R175C14" currently, but the problem is, this syntax has a specific reference to the cell location. I want to name the active cell w/o referencing it's location. Any help will be greatly appreciated! Thanks, Yippy --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding a line at the end of a macro to name the cell
Yippy,
Try something like ActiveWorkbook.Names.Add Name:="USAR", _ RefersTo:=ActiveCell -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "yippy " wrote in message ... Hi all, I have a macro that i want to edit. At the end of my current macro, the cursor is pointed to a specific cell, but it varies in location everytime. What I would like to do is to add a line to my currrent macro and name the active cell that it's pointing to. I have something like ActiveWorkbook.Names.Add Name:="USAR", RefersToR1C1:="=AR10!R175C14" currently, but the problem is, this syntax has a specific reference to the cell location. I want to name the active cell w/o referencing it's location. Any help will be greatly appreciated! Thanks, Yippy --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding a line at the end of a macro to name the cell
Or even:
activecell.name = "USAR" "yippy <" wrote: Hi all, I have a macro that i want to edit. At the end of my current macro, the cursor is pointed to a specific cell, but it varies in location everytime. What I would like to do is to add a line to my currrent macro and name the active cell that it's pointing to. I have something like ActiveWorkbook.Names.Add Name:="USAR", RefersToR1C1:="=AR10!R175C14" currently, but the problem is, this syntax has a specific reference to the cell location. I want to name the active cell w/o referencing it's location. Any help will be greatly appreciated! Thanks, Yippy --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem adding vertical marker line to line chart | Charts and Charting in Excel | |||
macro from columns to rows but adding every time a new line | Excel Discussion (Misc queries) | |||
Adding a second or separate line within a cell | Excel Discussion (Misc queries) | |||
Adding contents of another cell to the middle of a line of text | Excel Worksheet Functions | |||
Chart Type - Line Column adding a 2nd line | Charts and Charting in Excel |