Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Are rows hidden

Thanks to help from Nigel yesterday, I now have a macro which detects empty
cells in C2-C10 and hides those rows leaving other rows alone.



I should like to toggle that so is there a code for "are any rows hidden"
without going from row to row throughout the database?



If Rows.hidden = true then

Rows.unhide

Else

HideEmptyRows 'the macro to hide empty rows

Endif



Any suggestions - thanks



Camlad


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Are rows hidden

Hi,

maybe this

Range("C2:C10").EntireRow.Hidden = False

then your code to hide empty rows

Mike

"camlad" wrote:

Thanks to help from Nigel yesterday, I now have a macro which detects empty
cells in C2-C10 and hides those rows leaving other rows alone.



I should like to toggle that so is there a code for "are any rows hidden"
without going from row to row throughout the database?



If Rows.hidden = true then

Rows.unhide

Else

HideEmptyRows 'the macro to hide empty rows

Endif



Any suggestions - thanks



Camlad



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Are rows hidden

Thanks Mike - easy when you know how.

Camlad

"Mike H" wrote in message
...
Hi,

maybe this

Range("C2:C10").EntireRow.Hidden = False

then your code to hide empty rows

Mike

"camlad" wrote:

Thanks to help from Nigel yesterday, I now have a macro which detects
empty
cells in C2-C10 and hides those rows leaving other rows alone.



I should like to toggle that so is there a code for "are any rows hidden"
without going from row to row throughout the database?



If Rows.hidden = true then

Rows.unhide

Else

HideEmptyRows 'the macro to hide empty rows

Endif



Any suggestions - thanks



Camlad





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Are rows hidden

Oh! No Mike, it is not right now I have tried it.

Sub ToggleHideUnhideRows()
If Range("C2:C10").EntireRow.Hidden = False Then
OpenUp
Else
HideBlankDates
End If
End Sub

Open up works all the time even if they ARE open so the toggle
(HideBlankDates) is never run.

"If Range("C2:C10").EntireRow.Hidden = False" should be false if no rows are
hidden.

Thinking about it "C2:C10" is irrelevant. We want to test if ANY row in the
sheet is hidden.

Can you do that?

Camlad


"Mike H" wrote in message
...
Hi,

maybe this

Range("C2:C10").EntireRow.Hidden = False

then your code to hide empty rows

Mike

"camlad" wrote:

Thanks to help from Nigel yesterday, I now have a macro which detects
empty
cells in C2-C10 and hides those rows leaving other rows alone.



I should like to toggle that so is there a code for "are any rows hidden"
without going from row to row throughout the database?



If Rows.hidden = true then

Rows.unhide

Else

HideEmptyRows 'the macro to hide empty rows

Endif



Any suggestions - thanks



Camlad





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Are rows hidden

You can get this without using a loop.

ActiveSheet.Rows.Count - Range("A1:A" &
ActiveSheet.Rows.Count).Rows.SpecialCells(xlCellTy peVisible).Count

If this post is helpful click Yes
-------------
Jacob Skaria



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
opening a group but keep hidden rows hidden MWL Excel Discussion (Misc queries) 0 February 17th 09 03:16 PM
Hidden rows columns won't stay hidden christie Excel Worksheet Functions 0 September 30th 08 05:44 PM
Rows hidden by Autofilter vs hidden by changing the Hidden property LEO@KCC Excel Programming 4 September 11th 07 10:14 AM
Formula or Code to keep Hidden Rows Hidden Carol Excel Worksheet Functions 6 May 1st 07 11:45 PM
I need my Hidden Rows to stay hidden when I print the sheet. Rosaliewoo Excel Discussion (Misc queries) 2 July 20th 06 07:51 PM


All times are GMT +1. The time now is 08:55 AM.

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

About Us

"It's about Microsoft Excel"