Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ben
 
Posts: n/a
Default 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   Report Post  
Dave Peterson
 
Posts: n/a
Default

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   Report Post  
Ben
 
Posts: n/a
Default

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does excel recognise names rather than cells? Sue Excel Worksheet Functions 9 May 22nd 05 04:51 AM
Column Auto Width and Hidden Rows KWCounter Excel Discussion (Misc queries) 1 May 20th 05 12:59 AM
How Do I format an Excel sheet to have a 3D effecrt in rows? excelonly115 Excel Worksheet Functions 1 May 19th 05 03:57 PM
change excel row height without showing hidden rows LL Excel Worksheet Functions 1 April 15th 05 06:24 PM
make a macro to move specific rows to another sheet braxton Excel Worksheet Functions 1 February 21st 05 09:01 PM


All times are GMT +1. The time now is 09:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"