Hi,
Is it possible to use a text box or other object as a reference point in VBA?
I'm trying to use a simple code:
But I want to apply this to about 100 different ranges. I was trying to set this up as a module, my only problem is I won't know what cell the user will select beforehand to use as a reference.
For instance, I have text box 1, located in a:17 assigned to this module to unhide rows 18 to 53.
Ideally I want to use the same module for text box 2, located in a:54 to unhide rows 55 to 92.
I'm sure there's a way, but I'm having trouble finding it.
Thank you for your time in advance!
Is it possible to use a text box or other object as a reference point in VBA?
I'm trying to use a simple code:
Code:
Sub Show1()
Range("A17").Select
ActiveCell.Rows("1:37").EntireRow.Select
Selection.EntireRow.Hidden = False
Range("b18").Select
End Sub
But I want to apply this to about 100 different ranges. I was trying to set this up as a module, my only problem is I won't know what cell the user will select beforehand to use as a reference.
For instance, I have text box 1, located in a:17 assigned to this module to unhide rows 18 to 53.
Ideally I want to use the same module for text box 2, located in a:54 to unhide rows 55 to 92.
I'm sure there's a way, but I'm having trouble finding it.
Thank you for your time in advance!