Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hiding controls with rows
I have several controls in a named range. When I hide the range, the
controls all roll up on each other and aren't hidden (the same thing happens if I delete the range). I'm using this code: Me.[RangeName].Rows.RowHeight = 0 Any suggestions on how I can get the controls to hide too? They are Excel forms controls, not ActiveX. Thanks, Rob |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hiding controls with rows
Can you switch to the controls from the contol toolbox toolbar?
If not, how about going through the sheet's shapes and checking to see where they're located. If it's in that range, then hide that shape: Dim myShape As Shape Dim myRng As Range Set myRng = Me.Range("myRangeNameHere") myRng.Rows.RowHeight = 0 For Each myShape In Me.Shapes If Intersect(myShape.TopLeftCell, myRng) Is Nothing Then 'do nothing Else myShape.Visible = msoFalse End If Next myShape You'll need the opposite to show the shapes/rows. Rob Standefer wrote: I have several controls in a named range. When I hide the range, the controls all roll up on each other and aren't hidden (the same thing happens if I delete the range). I'm using this code: Me.[RangeName].Rows.RowHeight = 0 Any suggestions on how I can get the controls to hide too? They are Excel forms controls, not ActiveX. Thanks, Rob -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Color alternate rows when after hiding selected rows | Excel Worksheet Functions | |||
Hiding Specific Rows Based on Values in Other Rows | Excel Worksheet Functions | |||
Hiding a button when hiding rows | Excel Discussion (Misc queries) | |||
Hiding Rows if the linked rows are blank | Excel Discussion (Misc queries) | |||
Copying Rows when hiding other rows | Excel Worksheet Functions |