+ Reply to Thread
Results 1 to 8 of 8

Unable to Delete Named Objects

  1. #1
    Forum Contributor
    Join Date
    02-01-2019
    Location
    Illinois
    MS-Off Ver
    2016
    Posts
    223

    Unable to Delete Named Objects

    I'm new to using Names in Excel and was using some code without fully understanding it. As a result, I have added definitions of several Names that are assigning fixed values when I want to change the value.

    Since these Names were created without my understanding, I want to delete them and then create them more carefully. Unfortunately, when I go into 'Name Manager', the 'Delete' button is grayed out for several Names, per the following screen-capture:
    Names.png

    I tried running the following code to delete the Names, but it hung on the second line of code:
    Please Login or Register  to view this content.
    Does anyone have a solution to delete the Names?

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Unable to Delete Named Objects

    Is the worksheet protected or something?
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Contributor
    Join Date
    02-01-2019
    Location
    Illinois
    MS-Off Ver
    2016
    Posts
    223

    Re: Unable to Delete Named Objects

    Bingo! That was it. Thank you!

    I don't get why "that was it". The workbook has four worksheets. Six columns on one of the worksheets were protected. None of the Named objects were used in the six protected columns, but unprotecting those columns still somehow enabled me to delete all of the Named objects.

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Unable to Delete Named Objects

    It has to do with the fact that one or more where protected.
    Even if the named range is outside the locked cells.
    When protecting there are options that allow or permit modifying parts of worksheets etc.
    Check that to clarify, like e.g. Autofilter must be enabled when you protect a worksheet
    Don't forget to mark the post solved

  5. #5
    Forum Contributor
    Join Date
    02-01-2019
    Location
    Illinois
    MS-Off Ver
    2016
    Posts
    223

    Re: Unable to Delete Named Objects

    Thank you for getting back to me on the 'why' issue!

    Re "It has to do with the fact that one or more where protected.": This is obviously true, because your suggestion to unprotect the worksheet enabled me to delete the Named objects. However, can you be more specific about why this worked "Even if the named range is outside the locked cells"?

    Re "When protecting there are options that allow or permit modifying parts of worksheets etc.": Agreed, and I tried to choose 'good' options; e.g., I checkmarked:
    • Protect Worksheet and contents with locked cells
    • Select unlocked cells
    • Format cells
    • Edit objects
    • Edit scenarios
    Would you suggest a different set of options to checkmark? If 'yes', why?

    Re "Autofilter must be enabled when you protect a worksheet": Why is this?

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Unable to Delete Named Objects

    That's for you to decide and what you want to allow the user's to do.
    If you're using macro's there is an extra option to add when protecting the worksheet(s) using vba and that is UserInferceOnly:=True.
    This allows the VBA to modify any cell and keeps it locked for the users and you do not need to unprotect and protect the worksheet every time the macro runs.
    Look it up on Google for more about protecting and un protecting worksheets using VBA

  7. #7
    Forum Contributor
    Join Date
    02-01-2019
    Location
    Illinois
    MS-Off Ver
    2016
    Posts
    223

    Re: Unable to Delete Named Objects

    Thank you for your help.

  8. #8
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Unable to Delete Named Objects

    Glad to have been able to

+ 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. [SOLVED] Unable to remove objects pasted into Excel from HTML grid
    By kydan47 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-18-2021, 04:37 PM
  2. Replies: 2
    Last Post: 08-27-2018, 03:15 AM
  3. unable to delete or remove objects ? :(
    By VICTOR55 in forum Excel General
    Replies: 2
    Last Post: 01-05-2014, 07:36 AM
  4. Unable to Move Objects Off Of Page
    By mredmond13 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-12-2013, 04:05 PM
  5. [SOLVED] Unable to Reference Listbox Objects
    By wwalkerbout in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-10-2013, 02:59 PM
  6. Replies: 3
    Last Post: 11-08-2012, 07:25 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