S
Shoney
Hello,
A few days back, I received some help for a macro to enable/disable a toggle
button, based on the difference in the value of two different cellsI. That
macro is:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Temp As Double
Temp = Range("J4") / Range("H4")
If Temp < 0.5 Then
ToggleButton1.Enabled = True
Else: ToggleButton1.Enabled = False
End If
End Sub
It works great. Now, I want to use a similar macro to enable/disable a
command button (created via Control Toolbox) based on a single cell's value
(say H4, for example) I want the button enabled only if cell H4 is 300 or
higher. I have tried to adjust the above macro to no avail. I want the
current macro to be used for the first button and I want the new macro to run
for this new button.
Any help is appreciated.
Thank you.
A few days back, I received some help for a macro to enable/disable a toggle
button, based on the difference in the value of two different cellsI. That
macro is:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Temp As Double
Temp = Range("J4") / Range("H4")
If Temp < 0.5 Then
ToggleButton1.Enabled = True
Else: ToggleButton1.Enabled = False
End If
End Sub
It works great. Now, I want to use a similar macro to enable/disable a
command button (created via Control Toolbox) based on a single cell's value
(say H4, for example) I want the button enabled only if cell H4 is 300 or
higher. I have tried to adjust the above macro to no avail. I want the
current macro to be used for the first button and I want the new macro to run
for this new button.
Any help is appreciated.
Thank you.