I have a combobox in a worksheet which when the user changes the value in the box works perfectly (it shows the list of values in column A on sheet 1). However when the user just clicks on the dropdown tab it doesn't update the list.
The code on both the click event and the change event is the same. Any idea why this would not work and how to solve it?
The code is as follows:
The code on both the click event and the change event is the same. Any idea why this would not work and how to solve it?
The code is as follows:
Code:
Private Sub cboReport_Click()
Sheets("Sheet1").UnProtect "abc123"
Dim cl As Range
Dim lngLastRow As Long
lngLastRow = Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
If lngLastRow <> 3 Then
cboReport.List = Worksheets("Sheet1").Range("A3:A" & lngLastRow).Value
Else
cboReport.List = Worksheets("Sheet1").Range("A3:A4").Value
End If
End Sub