+ Reply to Thread
Results 1 to 8 of 8

Hide columns based on cell value - Unable to set hidden range property of Range Class

  1. #1
    Registered User
    Join Date
    08-08-2010
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2010
    Posts
    85

    Question Hide columns based on cell value - Unable to set hidden range property of Range Class

    test.xlsmHi

    I'm trying to write a very simple code (not using case select) to unhide columns based on variable entered into cell C5. (It's a number from 1 - 12 to represent a month)

    I tried using offset columns based on the month entered (so... if month is March (3)... ) but I'm getting a error message that I can't figure out....

    "Unable to set hidden range property of Range Class"... help?!

    Please Login or Register  to view this content.
    Last edited by trillium; 05-12-2012 at 06:58 PM. Reason: add spreadsheet

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Hide columns based on cell value - Unable to set hidden range property of Range Class

    perhaps change your last line to

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-08-2010
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Hide columns based on cell value - Unable to set hidden range property of Range Class

    hmmm... no longer get an error message but now nothing happens at all.... hmmmm....

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Hide columns based on cell value - Unable to set hidden range property of Range Class

    Easier if you post your workbook with description

  5. #5
    Registered User
    Join Date
    08-08-2010
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Hide columns based on cell value - Unable to set hidden range property of Range Class

    Here it is! :-)
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Hide columns based on cell value - Unable to set hidden range property of Range Class

    Not exactly sure if this is what you are looking for since you didn't provide me with description of the issue, but try

    PS: Move your month value in D4 to C3.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-08-2010
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Hide columns based on cell value - Unable to set hidden range property of Range Class

    hmmm just unhides all columns...???

  8. #8
    Registered User
    Join Date
    08-08-2010
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Hide columns based on cell value - Unable to set hidden range property of Range Class

    GOT IT!!!

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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