+ Reply to Thread
Results 1 to 3 of 3

Hid rows in a hidden sheet.

  1. #1
    Ben
    Guest

    Hid rows in a hidden sheet.

    Hi,
    I would like to hide few rows in range name created in a hidded sheet.
    I'm using this code:
    Sheets("ABC").Range("XYZ").Range(Cells(1, 1), Cells(5, 1)).EntireRow.Hidden
    = False
    This code work until the sheet ABC is Visible and Active.
    Is there a way to hide rows on a hidden sheet. I don't want to use:
    Sheets("ABC").Range("A1":"A5").EntireRow.Hidden = False
    Any help will be appreciated.
    Thank you.

  2. #2
    Dave Peterson
    Guest

    Re: Hid rows in a hidden sheet.

    you have some references to unqualified ranges (cells(1,1) and cells(5,1) refer
    to the activesheet.

    You could use something like:

    with sheets("abc").range("xyz")
    .range(.cells(1,1),.cells(5,1)).entirerow.hidden = false
    end with

    Those dots mean that the range belongs to the previous With object.


    Ben wrote:
    >
    > Hi,
    > I would like to hide few rows in range name created in a hidded sheet.
    > I'm using this code:
    > Sheets("ABC").Range("XYZ").Range(Cells(1, 1), Cells(5, 1)).EntireRow.Hidden
    > = False
    > This code work until the sheet ABC is Visible and Active.
    > Is there a way to hide rows on a hidden sheet. I don't want to use:
    > Sheets("ABC").Range("A1":"A5").EntireRow.Hidden = False
    > Any help will be appreciated.
    > Thank you.


    --

    Dave Peterson

  3. #3
    Ben
    Guest

    Re: Hid rows in a hidden sheet.

    Thank you Dave.
    I added the "." and now it is working fine.
    Thank you again.

    "Dave Peterson" wrote:

    > you have some references to unqualified ranges (cells(1,1) and cells(5,1) refer
    > to the activesheet.
    >
    > You could use something like:
    >
    > with sheets("abc").range("xyz")
    > .range(.cells(1,1),.cells(5,1)).entirerow.hidden = false
    > end with
    >
    > Those dots mean that the range belongs to the previous With object.
    >
    >
    > Ben wrote:
    > >
    > > Hi,
    > > I would like to hide few rows in range name created in a hidded sheet.
    > > I'm using this code:
    > > Sheets("ABC").Range("XYZ").Range(Cells(1, 1), Cells(5, 1)).EntireRow.Hidden
    > > = False
    > > This code work until the sheet ABC is Visible and Active.
    > > Is there a way to hide rows on a hidden sheet. I don't want to use:
    > > Sheets("ABC").Range("A1":"A5").EntireRow.Hidden = False
    > > Any help will be appreciated.
    > > Thank you.

    >
    > --
    >
    > Dave Peterson
    >


+ 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