Need auto hide rows macro to also hide Forms Check Boxes

RobbieNZ

New Member
Joined
Aug 17, 2010
Messages
21
Hi I have a macro that sits within different sheets in my workbook and hides rows based on the result in a cell.
I thought this was great until I added in Forms Check Boxes yesterday and found that rather than hide, these boxes just move down the page.

Is there any way to get the check boxes on the rows that are being hidden to also hide. There will be checkboxes that do not get hidden in the same sheet.

This is what I am using at the moment.
I need the Forms check boxes in the corresponding rows to also hide?
Is this possible and duplicatable in different sheets

** I wrote a similar post at the end of an old thread yesterday but was not sure if that was the correct place to put it so have posted a new thread here, hope this is ok.

Code:
Private Sub Worksheet_Calculate()
 
Dim myresult4 As String
Application.EnableEvents = False
Rows("1:" & Worksheets("PUMP CONTROL").UsedRange.Rows.Count).EntireRow.Hidden = False
 
 
myresult4 = Worksheets("PUMP CONTROL").Cells(22, 1).Value 'FGC options
Select Case myresult4
 
Case "", "None", "0", "APP"
Rows("22:26").EntireRow.Hidden = True
Rows("49:52").EntireRow.Hidden = True
 
End Select
 
 
Application.EnableEvents = True
End Sub
 

Some videos you may like

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

nightcrawler23

Well-known Member
Joined
Sep 24, 2009
Messages
721
Instead of a form control try using activex control and set its properties to move and size with cells. This should do what u want....
 

RobbieNZ

New Member
Joined
Aug 17, 2010
Messages
21
Sigh, that is what I was afraid of.

I guess I better figure out how to write an event handler.

Any ideas - I just want the check box to generate = 'True' to a different sheet if clicked. Each check box would independantly generate = True when clicked and poulate that response in separate cells in the different sheet.
 

Watch MrExcel Video

Forum statistics

Threads
1,108,581
Messages
5,523,710
Members
409,532
Latest member
Lmfacc

This Week's Hot Topics

Top