+ Reply to Thread
Results 1 to 8 of 8

Unable to set the Hidden property of the Range class

  1. #1
    Registered User
    Join Date
    02-28-2014
    Location
    Dubai
    MS-Off Ver
    Excel 2013
    Posts
    19

    Post Unable to set the Hidden property of the Range class

    I locked the cells on Sheet1 from B4 to B10.

    I protect the Sheet1 Review > protect sheet and selected two checkboxes from protect sheet property "Select locked Cell" and "Select unlocked cells".

    It is working fine and it does not allow the user to view the locked cells B17:B24 while protection is on.

    I have a RadioButton1 on the same Sheet1 and i put the following code behind the button to hide the 4 up to 10 rows. When i will press the button while password protection is on; it is giving me the following error: Unable to set the Hidden property of the Range class.

    Kindly help in this issue.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Unable to set the Hidden property of the Range class

    Hi, crimzon,

    unprotect teh sheet prior to running the command and protect after or protect the sheet with teh volatile parameter UserInterfaceOnly:=True which would allow macros to run when applied (but only for the session when this command has been executed).

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    02-28-2014
    Location
    Dubai
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Unable to set the Hidden property of the Range class

    Quote Originally Posted by HaHoBe View Post
    Hi, crimzon,

    unprotect teh sheet prior to running the command and protect after or protect the sheet with teh volatile parameter UserInterfaceOnly:=True which would allow macros to run when applied (but only for the session when this command has been executed).

    Ciao,
    Holger

    I cannot give the password to anybody to unprotect the sheet first and than run it and protect it again with you own password. This is not the way to handle the situation.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Unable to set the Hidden property of the Range class

    Hi, crimzon,

    who said you should do so? I said unprotect in the code, run the code, protect:
    Please Login or Register  to view this content.
    Besides: protecting the sheet is not the protection you imagine it to be.

    BTW: no need for full quotes.

    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    02-28-2014
    Location
    Dubai
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Unable to set the Hidden property of the Range class

    Please Login or Register  to view this content.
    In this case when i tried to pass parameters in Dropdown list or i want to perform another action; it says the sheet is protected. what shall i do now?

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Unable to set the Hidden property of the Range class

    Hi, crimzon,

    the prefix to this thread says Solved yet your question stands as posted. Without knowing what your dropdowns should trigger I would guess that you unlock those cells or attach a sample of the workbook to have a look. If I lock a sheet that´s would I would expect if I try to alter anything on the sheet.

    Ciao,
    Holger

  7. #7
    Registered User
    Join Date
    02-28-2014
    Location
    Dubai
    MS-Off Ver
    Excel 2013
    Posts
    19

    Exclamation Re: Unable to set the Hidden property of the Range class

    Quote Originally Posted by HaHoBe View Post
    Hi, crimzon,
    or attach a sample of the workbook to have a look.
    Thanks for you reply!
    Yes, i didn't get the answer of my question yet. I put it back to unsolved.

    Kindly check the attached XL file, when you will try to change the Drop List on the sheet; it will not allow you to change and it will say that sheet is protected.
    Attached Files Attached Files
    Last edited by crimzon; 03-20-2014 at 04:08 PM.

  8. #8
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Unable to set the Hidden property of the Range class

    Hi, crimzon,

    the original request has been solved and you have started a new thread with http://www.excelforum.com/excel-prog...g-vb-code.html where the problem should be solved.

    I´d recommend to check out Data/Validation instead of using DropDowns.

    Ciao,
    Holger

+ 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. Unable to set hidden property of the Range class
    By Andrew Kennerley in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2011, 04:34 PM
  2. Unable to set the hidden property of the range class
    By Christian411 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2009, 11:48 AM
  3. Unable to set the Hidden property of the Range class
    By luckycharm1668 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-07-2007, 11:12 PM
  4. Unable to set the Hidden property of the Range class
    By Pedros in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-29-2007, 08:47 PM
  5. [SOLVED] 1004 - Unable to set the hidden property of the range class
    By Tim Whitley in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2006, 05:55 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