Hello, I am farily new to VBA. Was wondering if there was a code in which if I selected a value from a combobox, then a value from a listbox, it would produce an output of "1" into a certain cell? My code explains a little into what I'm trying to achieve. Thank you



Private Sub btnEnterAvailability_Click()

Dim ws As Worksheet

Set ws = ThisWorkbook.Worksheets("Availability")



If (cboMembers.Value = "Member 1") And listTimes.Value = "5:00am" Then

ws.Range("B3").Value = "Yes"

End If

End Sub