+ Reply to Thread
Results 1 to 2 of 2

Error Whilst Updating Nodes On A Treeview

  1. #1
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Error Whilst Updating Nodes On A Treeview

    Hi everyone!

    I currently have a large workbook with many worksheets. To make life a little bit simpler for myself, I decided to create a navigation bar out of a TreeView control.

    This control has been working fine since I built it some time ago. However, today I decided to update the TreeView control by changing some of the parent/child node names and references. This is where my error started to occur.

    I keep receiving an error message regarding the key not being unique, but my previous setup had non-unique keys too with no issue, as they were children of separate parents (as they are in this case too!). Hence I can't understand why I am getting an error. I know that I can't have 2 children with the same name belonging to a single parent, but I was of the opinion that this wasn't an issue if the children had different parents.

    In the attachment, I have provided the old setup ("TreeViewSetup (Before)") and the new one ("TreeViewSetup (After)"). You will notice that the old navigation bar builds without issue, but the new one fails once I reach the "Navy" section. And yes, "Navy" and "Air Force" are both replicas of the "Army" section, so it doesn't make sense that the code crashes when it gets to Navy but not when it is building the "Army" menu.

    Thanks for any help I can get
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Error Whilst Updating Nodes On A Treeview

    Never mind, I solved it on my own.

    When I first setup the navigation bar, I must have been more intelligent than I am now, as I was smart enough then to realise thatto create duplicate keys I need to add a redundant space to the duplicate so that it only appears to be identical.

    I hope this helps someone else in future

+ 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. Error on saving whilst checking excel version
    By tryer in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-12-2011, 09:21 AM
  2. Count Children of all nodes in a treeview
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-18-2010, 10:05 AM
  3. Shape Nodes
    By incjourn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-08-2010, 03:53 PM
  4. Error Handling whilst using routing slip
    By davittp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-28-2007, 08:41 AM
  5. Creating Nodes
    By Andy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-10-2005, 03:40 PM

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