+ Reply to Thread
Results 1 to 13 of 13

Error 1004 Unable to set the hidden property of the range class

  1. #1
    Registered User
    Join Date
    12-12-2013
    Location
    Hollister, CA
    MS-Off Ver
    Excel 2003
    Posts
    16

    Error 1004 Unable to set the hidden property of the range class

    i have 7 ComboBoxes (CB) on my unprotected spreadsheet. When I go through the various Cases for CB6, it works perfect. However, when I go to any Case on CB2, I get this error and the Debugger highlights the line indicated below in CB6????? If I delete CB6, CB2 works perfect. I don't understand. Anyone have any suggestions

    Thank you for your time!!!!

    Please Login or Register  to view this content.
    Last edited by Tholmq; 07-16-2018 at 08:04 PM.

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Error 1004 Unable to set the hidden property of the range class

    Check to be sure that row 51:101 are not already hidden. If they are, the rows already being hidden could be causing the error.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Error 1004 Unable to set the hidden property of the range class

    You could just put:

    Please Login or Register  to view this content.
    at the head of your code
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Error 1004 Unable to set the hidden property of the range class

    Your example file is missing and your code is not between codetags.

  5. #5
    Registered User
    Join Date
    12-12-2013
    Location
    Hollister, CA
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Error 1004 Unable to set the hidden property of the range class

    Quote Originally Posted by Vraag en antwoord View Post
    Your example file is missing and your code is not between codetags.

    Hello Vraag,

    Attached is the file. Also, I am not sure what codetags are.

    Ty
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-12-2013
    Location
    Hollister, CA
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Error 1004 Unable to set the hidden property of the range class

    I tried this but it didn't work. Rows.Hidden=False

    Ty

  7. #7
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Error 1004 Unable to set the hidden property of the range class

    Mouse over the # which is above the box where you type and you will see it says "wrap [ code] tags around selected text"
    if you press that while selecting your code it will apply code tags.

    Please Login or Register  to view this content.
    it makes the forum tidier (and easier for people helping you to select code) so it is one of the forum rules.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Error 1004 Unable to set the hidden property of the range class

    Here's how to do the code tags:

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    *Your routines didn't fail??

  9. #9
    Registered User
    Join Date
    12-12-2013
    Location
    Hollister, CA
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Error 1004 Unable to set the hidden property of the range class

    Quote Originally Posted by xladept View Post
    Here's how to do the code tags:

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    *Your routines didn't fail??
    i apoligize. I forgot about codetags. I fixed it

    Ty

  10. #10
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Error 1004 Unable to set the hidden property of the range class

    You will notice that if you click on ComboBox2, the error occurs in the code for ComboBox6. When you change a value in ComboBox2, it causes a Change event in ComboBox6. This is happening because you are hiding rows 7:10 when there is a change to ComboBox2, and the ListFillRange in ComboBox6 is set to M1:M8.

    The solution to this is to put the list values that you have in M1:U8 onto another sheet, and update your comboboxes accordingly. You should always separate working data vs. parameters.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  11. #11
    Registered User
    Join Date
    12-12-2013
    Location
    Hollister, CA
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Error 1004 Unable to set the hidden property of the range class

    Quote Originally Posted by 6StringJazzer View Post
    You will notice that if you click on ComboBox2, the error occurs in the code for ComboBox6. When you change a value in ComboBox2, it causes a Change event in ComboBox6. This is happening because you are hiding rows 7:10 when there is a change to ComboBox2, and the ListFillRange in ComboBox6 is set to M1:M8.

    The solution to this is to put the list values that you have in M1:U8 onto another sheet, and update your comboboxes accordingly. You should always separate working data vs. parameters.
    That makes sense. I will try that.

  12. #12
    Registered User
    Join Date
    12-12-2013
    Location
    Hollister, CA
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Error 1004 Unable to set the hidden property of the range class

    Quote Originally Posted by 6StringJazzer View Post
    You will notice that if you click on ComboBox2, the error occurs in the code for ComboBox6. When you change a value in ComboBox2, it causes a Change event in ComboBox6. This is happening because you are hiding rows 7:10 when there is a change to ComboBox2, and the ListFillRange in ComboBox6 is set to M1:M8.

    The solution to this is to put the list values that you have in M1:U8 onto another sheet, and update your comboboxes accordingly. You should always separate working data vs. parameters.
    This fixed my problem. Thank you so much!!!!!

  13. #13
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Error 1004 Unable to set the hidden property of the range class

    Glad to hear it! You're welcome! Thanks for the rep, and thanks for marking your thread Solved.

+ 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] Run-time error '1004' - Unable to set the Hidden property of the Range class
    By redoscar in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-04-2017, 09:34 AM
  2. Error 1004: Unable to Set Hidden property of the range class...
    By jaysakle in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-03-2013, 02:51 AM
  3. [SOLVED] Run time error 1004: Unable to set hidden property of range class
    By SAVIOBLUEFOX in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2013, 10:38 AM
  4. [SOLVED] Runtime error 1004: Unable to set the hidden property of range class
    By Loobrush in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-10-2013, 05:18 AM
  5. Help Please w/ Run-time error '1004' Unable to set the Hidden property of the Range Class
    By ExcelNewbie2534 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2012, 07:38 PM
  6. Error 1004 (unable to set the hidden property of the range class)
    By alex.heng in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-14-2011, 12:45 AM
  7. Error 1004 Unable to set the Hidden Property of the Range Class
    By nld in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2007, 10:56 AM

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