The name conflicts with a built-in name RRS feed

  • Question

  • I have a Word addin where users can add names to a master list of range names to be used in Excel.

    I need to validate the range names before adding them to the master list and so far I havent been able to figure out how to validate the name to prevent this issue:

    "The name conflicts with a built-in name"

    Any ideas?

    Richard LT
    Wednesday, November 30, 2011 9:08 PM

All replies

  • It really depends how you're storing the list. If it's a List<T> type (C#) there's a built in function to see if a list already contains an entry. Otherwise, you may need to iterate over the contents of your list comparing each item in turn.

    Unless I've wildly misunderstood the question, you will be better off asking this in a VB/C# forum.

    • Edited by JosephFox Wednesday, November 30, 2011 9:46 PM typo
    Wednesday, November 30, 2011 9:44 PM
  • Hi Richard,

    What do you mean of Master list, how it works, how you pass the list to Excel? I think you need be more specific about what you are trying to do.

    I look forward to hearing of you.

    Calvin Gao[MSFT]
    MSDN Community Support | Feedback to us
    Thursday, December 1, 2011 8:21 AM
  • The list is kept in an XML file and it contains all our user defined range names. We expose these names to users via a VSTO addin in both Word and Excel.

    When users try to add a new name to the list I'd like to validate it to prevent creating a name that breaks the Excel rule that doesnt allow names such as XEZ12584 because they conflict with built-in cell names.

    Richard LT
    Thursday, December 1, 2011 3:18 PM