+ Reply to Thread
Results 1 to 6 of 6

Run-time error '1004': Unable to set the hidden property of the range class

  1. #1
    Registered User
    Join Date
    04-26-2017
    Location
    India
    MS-Off Ver
    2003
    Posts
    4

    Run-time error '1004': Unable to set the hidden property of the range class

    I have this code but this show an error-Run-time error '1004': Unable to set the hidden property of the range class
    And one thing more i want to use same code on different sheets in same Workbook.
    Sub Hide_Unhide()
    '
    ' Hide_Unhide Macro
    ' Macro recorded 5/9/2017
    '
    ' Keyboard Shortcut: Ctrl+s
    '
    If Range("T3069").Value = 30 Then
    Rows("3070:3121").EntireRow.Hidden = True
    Else
    Rows("3070:3121").EntireRow.Hidden = False
    End If
    End Sub

    Lovekush

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

    Re: Run-time error '1004': Unable to set the hidden property of the range class

    Hi lovekush

    The above code works fine when tested:

    Please Login or Register  to view this content.
    Last edited by sintek; 05-10-2017 at 05:13 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Run-time error '1004': Unable to set the hidden property of the range class

    You are not specifying the sheet names in the code.
    Teach me Excel VBA

  4. #4
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Run-time error '1004': Unable to set the hidden property of the range class

    Quote Originally Posted by ImranBhatti View Post
    You are not specifying the sheet names in the code.
    by default that will work with ActiveSheet - whatever this is :-)
    If you are pleased with a member's answer then use the Star icon to rate it.

  5. #5
    Registered User
    Join Date
    04-26-2017
    Location
    India
    MS-Off Ver
    2003
    Posts
    4

    Re: Run-time error '1004': Unable to set the hidden property of the range class

    Sir,
    I say that here are many sheets like that- Sheet1, Sheet2,...

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

    Re: Run-time error '1004': Unable to set the hidden property of the range class

    Put the code in ThisWorkBook module

    EDITED:
    double-click on ThisWorkbook below the sheets in VB and paste your code

+ 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. run time error 1004 unable to set the hidden property of the worksheet class
    By curness in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2015, 05:41 PM
  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. 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
  5. 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
  6. Run-time error 1004: Unable to set the hidden property of the Range class.
    By seabee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2011, 05:09 PM
  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

Tags for this Thread

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