|
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
If TextBox1.Text = "" Then Exit Sub
zd = TextBox1.Text
With Sheets("换料比较")
r = .Cells(Rows.Count, 3).End(xlUp).Row + 1
.Cells(r, 3) = zd
End With
TextBox1.Text = Split(zd, "|")(0)
TextBox2.SetFocus
End If
End Sub
Private Sub TextBox2_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
If TextBox2.Text = "" Then Exit Sub
zd = TextBox2.Text
With Sheets("换料比较")
r = .Cells(Rows.Count, 4).End(xlUp).Row + 1
.Cells(r, 4) = zd
TextBox2.Text = Split(zd, "|")(0)
If TextBox1.Text = TextBox2.Text Then
.Cells(r, 5) = "OK"
Else
.Cells(r, 5) = "NG"
End If
End With
TextBox1.SetFocus
End If
End Sub
|
评分
-
1
查看全部评分
-
|