Hi,
this is my first post, and I am new to excel programming so struggling to make sense of it. I want to show/hide various rows depending on the output of an option box. Thanks to responses to other posts in MrExcel I have successfully managed to do this, except for an Option Button that is contained within the 'hidden' rows which still remains. I assume this is because it is 'floating' rather than attached to a unique cell, but I could be wrong. My current code is this:
Private Sub FuelSource1_Click()
If FuelSource1.Value = True Then Range("Fuel_Source").Value = 1
If FuelSource1.Value = True Then
[20:37].EntireRow.Hidden = True
Else: [37:47].EntireRow.Hidden = False
End If
End Sub
I tried inserting the following but it didn't work:
If FuelSource1.Value = True Then
"Forms.OptionButton.1".Hidden = True
I am so close to being able to make Excel do what I want it to do and this is my last (I hope) stumbling block. If I can't solve this I may be back to the drawing board with days of work wasted, so I am in desperate need of some advice. Can anyone please tell me if there is a way to hide the Option Button as well as the rows?
Thank you so much.
this is my first post, and I am new to excel programming so struggling to make sense of it. I want to show/hide various rows depending on the output of an option box. Thanks to responses to other posts in MrExcel I have successfully managed to do this, except for an Option Button that is contained within the 'hidden' rows which still remains. I assume this is because it is 'floating' rather than attached to a unique cell, but I could be wrong. My current code is this:
Private Sub FuelSource1_Click()
If FuelSource1.Value = True Then Range("Fuel_Source").Value = 1
If FuelSource1.Value = True Then
[20:37].EntireRow.Hidden = True
Else: [37:47].EntireRow.Hidden = False
End If
End Sub
I tried inserting the following but it didn't work:
If FuelSource1.Value = True Then
"Forms.OptionButton.1".Hidden = True
I am so close to being able to make Excel do what I want it to do and this is my last (I hope) stumbling block. If I can't solve this I may be back to the drawing board with days of work wasted, so I am in desperate need of some advice. Can anyone please tell me if there is a way to hide the Option Button as well as the rows?
Thank you so much.