Hiding controls with rows

  • Thread starter Thread starter Rob Standefer
  • Start date Start date
R

Rob Standefer

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
 
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 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top