Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Hide Rows If Cell Value = False

Windows 2000; Excel 2000

I am using several checkbox controls (format control and
cell link) to toggle a cell's value between 'True'
and 'False'.

I would like to hide or unhide rows based on these cells.

Any suggestions besides using AutoFilter?

Thanks in advance.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Hide Rows If Cell Value = False

Hi
try something like the following:
Sub hide_rows()
Dim RowNdx As Long
Dim LastRow As Long

LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).row
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "A").Value = False Then
Rows(RowNdx).hidden = True
End If
Next RowNdx
End Sub

hides all 'False' rows in column A


--
Regards
Frank Kabel
Frankfurt, Germany


TOMB wrote:
Windows 2000; Excel 2000

I am using several checkbox controls (format control and
cell link) to toggle a cell's value between 'True'
and 'False'.

I would like to hide or unhide rows based on these cells.

Any suggestions besides using AutoFilter?

Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hide Rows If Cell Value = False

use the click event of the checkbox.

--
Regards,
Tom Ogilvy

"TOMB" wrote in message
...
Windows 2000; Excel 2000

I am using several checkbox controls (format control and
cell link) to toggle a cell's value between 'True'
and 'False'.

I would like to hide or unhide rows based on these cells.

Any suggestions besides using AutoFilter?

Thanks in advance.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Hide Rows If Cell Value = False

Frank, thanks for the help. You got me 90% there! I just
had to add a few lines and change the column reference.
You made it easy for me!

- - TB - -

-----Original Message-----
Hi
try something like the following:
Sub hide_rows()
Dim RowNdx As Long
Dim LastRow As Long

LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).row
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "A").Value = False Then
Rows(RowNdx).hidden = True
End If
Next RowNdx
End Sub

hides all 'False' rows in column A


--
Regards
Frank Kabel
Frankfurt, Germany


TOMB wrote:
Windows 2000; Excel 2000

I am using several checkbox controls (format control and
cell link) to toggle a cell's value between 'True'
and 'False'.

I would like to hide or unhide rows based on these

cells.

Any suggestions besides using AutoFilter?

Thanks in advance.

.

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
How do I automatically hide "FALSE" rows? Kiley Excel Discussion (Misc queries) 14 March 12th 09 06:55 PM
Hide Buttons when a Cell is False [email protected] Excel Discussion (Misc queries) 0 January 23rd 08 01:52 AM
Hide (visible+AD0-false) all open applications? Joe 90[_2_] Excel Programming 0 October 23rd 03 07:12 PM
Hide (visible=false) all open applications? Joe 90[_2_] Excel Programming 4 October 23rd 03 06:04 PM
Hide (visible+AD0-false) all open applications? Joe 90[_2_] Excel Programming 0 October 23rd 03 02:00 AM


All times are GMT +1. The time now is 02:34 AM.

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"