![]() |
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/ |
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/ |
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 |
All times are GMT +1. The time now is 07:05 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com