Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem adding vertical marker line to line chart lbb Charts and Charting in Excel 6 January 9th 09 09:02 AM
macro from columns to rows but adding every time a new line [email protected] Excel Discussion (Misc queries) 2 December 7th 08 08:59 PM
Adding a second or separate line within a cell TROOPER Excel Discussion (Misc queries) 0 October 17th 08 04:26 PM
Adding contents of another cell to the middle of a line of text [email protected] Excel Worksheet Functions 1 September 22nd 08 08:06 PM
Chart Type - Line Column adding a 2nd line [email protected] Charts and Charting in Excel 1 October 24th 06 04:17 PM


All times are GMT +1. The time now is 01:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"