Tại sao khi nhập số, ô chỉ hiện được 1 số duy nhất là 1, bấm tiếp số 2 thì ô chỉ hiện số 2, tức là chỉ hiện 1 số gần nhất mình vừa nhập
Private Sub TextBox_Quantity_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If Not IsNumeric(Chr(KeyAscii)) And KeyAscii <> 8 Then
KeyAscii = 0
If Not IsNumeric(TextBox_Quantity.Value) Then
MsgBox "Invalid price value"
TextBox_Quantity.Value = ""
End If
Else
TextBox_Quantity.Value = Format(TextBox_Price.Value, "#,##0")
End If
End Sub
Em gửi file. Thầy xem giúp em nhé. Em cám ơn.https://drive.google.com/file/d/1T4XWT514lXVPTqnJgqa_Dug0KA3mcQdM/view?usp=sharing
Bạn cho gitiho xin quyền truy cập nhé
Dạ, em đã mở quyền truy cập rồi. Thầy xem lại xem đã được chưa ạ?
Bạn sử phần vlookup như sau nhé
Private Sub cb_Tenhang_Change()
If Me.cb_Tenhang <> "" Then
Me.tb_DVT.Text = Application.WorksheetFunction.VLookup(Me.cb_Tenhang.Text, Sheets("DS_Hang").Range("A3:B6"), 2, 0)
Else
Me.tb_DVT.Value = ""
End If
End Sub
Cám ơn thầy