+ Reply to Thread
Results 1 to 6 of 6

current region = name

  1. #1
    Registered User
    Join Date
    04-21-2004
    Posts
    28

    current region = name

    In a new purchase order database of mine, I add new items via a custom userform. Can I use "current region" to update the name of the expanded range each time "enter" is clicked, or do I need another method?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why do you need to do this? Is it used in later code?

    You could use a Dynamic Named Range.
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    04-21-2004
    Posts
    28
    Thanks. To tell the truth, I'm more curious than anything else. I've been learning to do a lot more with ranges, formulas, etc., in VBA, & I just wondered, if I can select the current region, (I can), how would I then name it?

  4. #4
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    something like this - you could also refer to a cell such as A1 in the range reference vs a name

    Please Login or Register  to view this content.
    not a professional, just trying to assist.....

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    If you create a Dynamic Named Range then you would't need to kep repeating the code.

  6. #6
    Registered User
    Join Date
    04-21-2004
    Posts
    28
    Thanks again. I've created a dynamic named range & that works great. Like I said, though, I don't know how to create a "name" in vba. If I have a range selected, is it just like selection.name = "insertnamehere", or what? Sometimes I'm amazed at the tricks I can do with so little knowledge. Lots of fun though.

+ 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