Dear Community:
I'm new at coding and I'm trying to do the same as the initial thread. But for some reason I'm getting this error
Run-time error '424'
Object required
I'm attaching the workbook that I'm trying to use.
By default, the cell G8 has a value of "Please select the Probability". After we click the command button "Calculate Probability", a form pops up, we need to provide answers to the questionnaire and click on the button "Calculate".
With the button, a calculation begins and the results affects the content of cell G8 and it triggers the CheckBox to be enabled. The condition to enable the CheckBox is that the content of the G8 cell must be different from "Please select the Probability".
Here is the code:
Private Sub cmdCalcProb_Click()
With Worksheets("Data")
.Range("C1:C12").ClearContents
End With
With Worksheets("Probability+Impact")
If .Range("G8").Value = "Please select the Probability" Then
.CheckBox1.Enabled = False
.CheckBox1.Value = False
Else
.CheckBox1.Enabled = True
End If
End With
Probability.Show
End Sub
Highlighted is the line where I get the error.
Hope someone could help me, please
Bookmarks