0
I am trying to keep a button disabled until all required fields are completed. I have the button disabled at initialize and I can get it to enable with one field completed using the code below. How do I add the other fields that are required to be completed?
I tried the following, but it enables the button after one field is completed and not all three. Note Findings and CompletionTime are textboxes in the userform, Failure is a listbox. Please HELP!
I am trying to keep a button disabled until all required fields are completed. I have the button disabled at initialize and I can get it to enable with one field completed using the code below. How do I add the other fields that are required to be completed?
VBA Code:
`Private Sub Findings_Change()
If Findings.Value <> "" Then
btnOk.Enabled = True
Else: btnOk.Enabled = False
End If
End Sub`
I tried the following, but it enables the button after one field is completed and not all three. Note Findings and CompletionTime are textboxes in the userform, Failure is a listbox. Please HELP!
VBA Code:
Private Sub Findings_Change()
If Findings.Value <> "" Then
btnOk.Enabled = True
Else: btnOk.Enabled = False
End If
End Sub
Private Sub Failure_Change()
If Failure.Value <> "" Then
btnOk.Enabled = True
Else: btnOk.Enabled = False
End If
End Sub
Private Sub CompletionTime_Change()
If CompletionTime.Value <> "" Then
btnOk.Enabled = True
Else: btnOk.Enabled = False
End If
End Sub