|
Private Sub CommandButton1_Click()
On Error Resume Next
If TextBox1.Value = "" Or TextBox2.Value = "" Or TextBox3.Value = "" Or TextBox4.Value = "" Or TextBox5.Value = "" Or TextBox6.Value = "" Or TextBox7.Value = "" Or TextBox8.Value = "" Or TextBox9.Value = "" Then
MsgBox "请输入完整数据"
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
TextBox8.Value = ""
TextBox9.Value = ""
End If
Dim myluru As Long
myluru = [a65536].End(xlUp).Row + 1
Cells(myluru, 1).Value = TextBox1.Value
Cells(myluru, 2).Value = TextBox2.Value
Cells(myluru, 3).Value = TextBox3.Value
Cells(myluru, 3).Value = TextBox4.Value
Cells(myluru, 3).Value = TextBox5.Value
Cells(myluru, 3).Value = TextBox6.Value
Cells(myluru, 3).Value = TextBox7.Value
Cells(myluru, 3).Value = TextBox8.Value
Cells(myluru, 3).Value = TextBox9.Value
Cells(myluru, 3).Value = TextBox10.Value
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
TextBox8.Value = ""
TextBox9.Value = ""
End Sub
大概是这样改,一个一个比对就行了 |
|