+ Reply to Thread
Results 1 to 3 of 3

Using Named ranges in VBA

  1. #1
    Registered User
    Join Date
    08-27-2014
    Location
    Albany, NY
    MS-Off Ver
    Office 2010
    Posts
    91

    Using Named ranges in VBA

    I am trying to add a string to a named range's Refersto value. The issue is that the string has to being with a "=" to be used with another internal tool. I can create the string easily, but i get the error attached when I try to add the reference. Is there any way to override the error, and place the string having a "=" at the start of the string. A VERY simplified mocked up example is below:

    Please Login or Register  to view this content.
    Any help to make this work would be great as I can't change the other end of the process, I need to shoehorn this to work. I know its possible beacuse its done elsewhere, but the guy who wrote the code is no longer around and I can't ask him...I am kinda SOL

    12-22-2016 11-28-34 AM.png

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Using Named ranges in VBA

    ...maybe

    Please Login or Register  to view this content.
    Although it's not clear what the items in th e{} refer to and why you are using them.

    Any chance you could upload the example workbook and explain to which range do you expect the name should apply after the VBA code
    Last edited by Richard Buttrey; 12-22-2016 at 12:51 PM.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    08-27-2014
    Location
    Albany, NY
    MS-Off Ver
    Office 2010
    Posts
    91

    Re: Using Named ranges in VBA

    I actually had to make a correction. To get the quotation marks I need, I changed it to this:

    Please Login or Register  to view this content.
    tested it and still get the same error.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy values of all named range in wb1 to identically named ranges in wb2
    By JAMIAM in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-24-2016, 06:58 PM
  2. [SOLVED] VBA creates named ranges, but named ranges disappear
    By BrotherNeptune in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-05-2015, 03:22 PM
  3. Define only 2 named ranges from a list of named ranges...
    By abhi900 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-29-2014, 04:20 AM
  4. Looping Mutliple Named Resized Ranges in next empty row below another named range
    By gingumdog in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-19-2014, 08:15 PM
  5. [SOLVED] Determining if the value of a cell can be a named range, then assigning named ranges after
    By Romulo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-15-2013, 06:05 PM
  6. Copy data in named ranges to a newer version of the same template to identical ranges
    By handstand in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-21-2006, 10:51 AM
  7. Replies: 1
    Last Post: 03-21-2006, 06:40 PM

Tags for this Thread

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