+ Reply to Thread
Results 1 to 3 of 3

Hiding blank rows on a different sheet

  1. #1
    Registered User
    Join Date
    07-12-2007
    Posts
    24

    Hiding blank rows on a different sheet

    I'm having some problems getting this code to work. The code is located in a sheet called "Setup" but I want it to run on a sheet called "New"
    Please Login or Register  to view this content.
    I have tried modifying the code to the following
    Please Login or Register  to view this content.
    When I do this it doesn't like the last row of code. Anybody have any ideas.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    I needed to change the property from Worksheet to Worksheets.

    I got an error on that line when all cells in the range were filled. The IsEmpty always fails and rng never gets Set.
    Testing whether rng Is Nothing should fix that.

    Please Login or Register  to view this content.
    This also could be done using SpecialCells. The Error code is there to handle the same situation of no blank cells.

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    07-12-2007
    Posts
    24
    Thanks Mike the first bit of code worked great. My next problem is the "New" sheet contains a formula in the range d9:d44. The code thinks there is data in these fields and thus won't hide the lines. The formula is a simple one (=Setup!B20) but enough to cause it grief. I need to keep the formula. The output in range d9:d44 is not numbers but words. Can we tweak the code so that it looks for a value in the cells.
    Thanks
    Rob

+ 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