Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Range name for a cell

Status
Not open for further replies.

LonnieP

Structural
Oct 20, 2009
80
I need a macro to give a cell a range name. Using the macro recorder I get:

ActiveWorkbook.Names.Add Name:="modulename", RefersToR1C1:="=Sheet1!R6C7"
Range("G6").Select

How do I change this so the range is the currently active cell. I tried to leave the 'RefersTo' stuff off but it didn't like that at all.

Help
 
Replies continue below

Recommended for you

Never mind, I got it. "RefersToR1C1:=ActiveCell" seems to work.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor