Hid rows in a hidden sheet.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top