Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default checkbox to hide/show row

hi,
if anyone can help it'd be appreciated. Here is what I'd like to
accomplish:

on sheet3 I want to insert a Category with checkboxes next to each
item

On sheet one I want to hide/show categories that have been
checked...and hide the rows if I uncheck them.

thank u for your input
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default checkbox to hide/show row

Hi

The code below would be one way of doing it. Run this code in the
worksheet with the checkboxes, it will control the hiding of rows 1-5
on sheet1.

Option Explicit
Dim WkSh As Worksheet

Private Sub CheckBox1_Click()

Set WkSh = ThisWorkbook.Sheets("Sheet1")

If CheckBox1.Value = False Then

WkSh.Rows("1:5").EntireRow.Hidden = True

Else

If WkSh.Rows("1:5").Hidden = True Then

WkSh.Rows("1:5").EntireRow.Hidden = False

End If

End If

End Sub

Hope this helps

Steve

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
use checkbox to hide rows ScottB Excel Discussion (Misc queries) 2 August 20th 08 01:05 PM
Hide & Unhide with a Checkbox Jonathan Excel Programming 5 October 5th 05 12:16 PM
hide rows from checkbox Qaspec Excel Programming 1 May 25th 05 10:32 PM
hide or unhide pivotfield using a checkbox Richard[_33_] Excel Programming 0 February 10th 05 12:02 PM
Checkbox to hide or show rows Dave Peterson[_3_] Excel Programming 0 January 21st 04 03:23 AM


All times are GMT +1. The time now is 06:36 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"