============Thank bạn Cheettit Man
Private Sub Unitscan_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Len(Me.Unitscan) > 0 Then
Listimei_scan.AddItem Unitscan.Text, 0
With Sheets("Program")
If Me.Unitscan.Value <> Empty Then
.Range("B100").End(3).Offset(1).Resize(, 1).Value = Me.Unitscan.Value
Me.Unitscan.Value = ""
End If
End With
Cancel = True
End If
End Sub
Thank bạn nhiều, mình đã làm OK rùiLồng code vào trong 1 If
PHP:Private Sub Unitscan_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Len(Me.Unitscan) > 0 Then Listimei_scan.AddItem Unitscan.Text, 0 With Sheets("Program") If Me.Unitscan.Value <> Empty Then .Range("B100").End(3).Offset(1).Resize(, 1).Value = Me.Unitscan.Value Me.Unitscan.Value = "" End If End With Cancel = True End If End Sub
DIỄN ĐÀN GIẢI PHÁP EXCEL