- Tham gia
- 22/7/14
- Bài viết
- 355
- Được thích
- 31
Mình có có tạo 1 combobox Control để nhập liệu cho nhanh tại vùng F2:H2 mình đã Merge and Center . không hiểu sao nếu mình chọn vào chổ mủi tên để sổ xuống danh sách của Combobox thì hiện lên lỗi này
cODE NEK anh em xem giúp mình
Private Sub worksheet_Selectionchange(ByVal target As Range)
If target.Address = "$F$2" Or target.Address = "$G$2" Or target.Address = "$H$2" Then
ComboBox3.Visible = True
ComboBox3.Activate
Else
If ComboBox3.Visible = True Then
ComboBox3.Visible = False
End If
End If
Endsub
Private Sub ComboBox3_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Range("F3").Select
End Sub
View attachment loi combobox.bmp
cODE NEK anh em xem giúp mình
Private Sub worksheet_Selectionchange(ByVal target As Range)
If target.Address = "$F$2" Or target.Address = "$G$2" Or target.Address = "$H$2" Then
ComboBox3.Visible = True
ComboBox3.Activate
Else
If ComboBox3.Visible = True Then
ComboBox3.Visible = False
End If
End If
Endsub
Private Sub ComboBox3_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Range("F3").Select
End Sub
View attachment loi combobox.bmp


)