Results 1 to 3 of 3

Unable to set hidden property of the Range class

Threaded View

  1. #1
    Registered User
    Join Date
    10-11-2011
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    4

    Unable to set hidden property of the Range class

    Hi

    There have been quite a few posts relating to this - but none has solved my problem.

    I have some vb that hides rows in a report where it comes across an empty cell:
    Sub HideRow(HideRange As Range)
    ' Hide rows where missing data
        For Each c In HideRange
            If c.Value = "" Then
                c.EntireRow.Hidden = True
            Else
                c.EntireRow.Hidden = False
            End If
        Next c
    End Sub
    I select a parameter from a dropdown and this updates the report. I then call the vb with Call HideRow(Worksheets("3.3").Range("c9.c68"))

    Sometimes I get the message: Runtime error 1004: Unable to set hidden property of the Range class.

    Its intermittant and I've been unable to identify a pattern.
    There are no comments or objects on the sheet.

    Thanks
    Last edited by Leith Ross; 10-11-2011 at 12:25 PM. Reason: Added Code Tags

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