+ Reply to Thread
Results 1 to 5 of 5

VBA to define current selection as a named range?

  1. #1
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    293

    VBA to define current selection as a named range?

    I understand that this is probably pretty easy, I just dont know how to do it. So please excuse my ignorance on this. I am trying to teach myself.

    This is another thread that I started and with the help of another memeber, they were able to write a code that works just the same I want it to per my request....now I want to take it one step further. Thread is here: http://www.excelforum.com/excel-prog...html?p=2674591

    This code just selects a cell range.

    Now I just want to define or name that range as if I were going to go to FORMULAS > NAME MANAGER > NEW. ....to define it as 'SAMPLENAME'

    How do I code that?

    Im assuming it goes after:
    Please Login or Register  to view this content.
    Last edited by clemsoncooz; 01-04-2012 at 05:55 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202

    Re: VBA to define current selection as a named range?

    Try

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: VBA to define current selection as a named range?

    You can also use
    Please Login or Register  to view this content.
    Good luck.

  4. #4
    Forum Contributor
    Join Date
    12-20-2011
    Location
    United States, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    293

    Re: VBA to define current selection as a named range?

    Thanks to the both of you!

    And to clear it out would be:
    Please Login or Register  to view this content.
    Correct?

    is there a way to clear ALL the names ?

  5. #5
    Forum Guru
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: VBA to define current selection as a named range?

    hi clemsoncooz, option to make it:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1