+ Reply to Thread
Results 1 to 7 of 7

Unhide Hidden Rows

  1. #1
    Registered User
    Join Date
    06-03-2009
    Location
    Saskatoon, Canada
    MS-Off Ver
    Excel 2003
    Posts
    15

    Unhide Hidden Rows

    I have a worksheet with a macro as follows:

    Please Login or Register  to view this content.
    What I also need is a code to reverse this or show all rows which have values in column "C".

    What's happening is when I change the Value = False and run the macro, the sheet unhides all rows up to the last row which has a value in column "F", then leaves the remaining rows hidden.

    Example:

    Row 16 has a value, but there are 133 rows in all. I run the code shown, all rows except 16 hide. (Good so far) but if I want to reverse it and show all rows again

    Please Login or Register  to view this content.
    Everything become unhidden up to Row 16 then the macro stops. Rows 17-133 remain hidden.
    Last edited by bruce2444; 09-08-2009 at 10:33 PM.

  2. #2
    Registered User
    Join Date
    09-02-2009
    Location
    Edinburgh, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: Unhide Hidden Rows

    end(xlup).row is returning the last visible row of data, which at the time is 16. there are a few ways around this. if you just want to unhide all rows, then use something like
    Please Login or Register  to view this content.
    Last edited by blackworx; 09-05-2009 at 02:33 PM.

  3. #3
    Registered User
    Join Date
    06-03-2009
    Location
    Saskatoon, Canada
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Unhide Hidden Rows

    Please forgive my lack of knowledge or frustration with this but I understand what you are saying about "end(xlup).row is returning the last visible row of data" so exactly how would I rewrite this code with "Rows(Rows.Count).Hidden = False"

    Please Login or Register  to view this content.
    The reason I ask is because I have another code connected to a hyperlink:

    Please Login or Register  to view this content.
    and when I altered my original unhide code, I began getting error in the hyperlink code.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Unhide Hidden Rows

    I can't tell what you're trying to do (a clear explanation would be better than showing code that doesn't work), but if you want to unhide all rows, then not
    Please Login or Register  to view this content.
    ... which unhides the last row on the sheet, but
    Please Login or Register  to view this content.
    ... which unhides all rows.

    If it appears inside a With someSheet block, then
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    06-03-2009
    Location
    Saskatoon, Canada
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Unhide Hidden Rows

    I have a workbook with numerous worksheets for calculations that many of our employees will be using therefore, trying to simply as much as possible.

    What happens is, we receive data from a 3rd party company and this data is copied into the “ACV” worksheet. And at this time we provide our clients with a partial payment. When they purchase the item and provide an invoice, we pay them the remainder up to a predetermined amount.

    I would then go to “Payment1” – Click the link to “Generate Worksheet” and enter in the amount the client paid for the item and the worksheet will tell me how much more I have to pay them.

    I’m trying to keep the original file as small as possible.

    Now sometime the client will only purchase some of the items and provide invoices numerous times thus the reasoning for multiple payment worksheets.

    What I’m trying to accomplish with the hide/unhide codes is to hide the rows which haven’t been replaced (because some times there can be 5000+ items). The hide function works fine.

    What I’m trying to do now is unhide the entire worksheet after it’s been hidden, in case I missed an invoice or have to refer to a line which was hidden.

    The hide code was altered from a “BeforePrint(Cancel As Boolean)” code I had used previously. I just changed a few things so it wouldn't just begin printing once the code ran. The code hides row which have no data in Column F.

    I have attached a copy of my worksheet so far, so you can see for yourself in case this explanation made no sense.
    Attached Files Attached Files

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Unhide Hidden Rows

    To unhide rows, replace
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-03-2009
    Location
    Saskatoon, Canada
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Unhide Hidden Rows

    That works...thanks

+ 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