|
各位老师好:我想请教一个小问题,下面是一段窗体的信息录入窗口代码,我想在录入信息遇到同一人时怎样能填补原有不全的信息(也就是说,遇到同一姓名时覆盖在原来信息的位置上)麻烦老师了。谢谢!
Private Sub CommandButton1_Click()
Dim a As Long
a = Sheet1.Range("B65535").End(xlUp).Row + 1
Sheet1.Cells(a, "B") = TextBox1.Value
Sheet1.Cells(a, "C") = TextBox2.Value
Sheet1.Cells(a, "D") = TextBox3.Value
Sheet1.Cells(a, "E") = TextBox4.Value
Sheet1.Cells(a, "F") = TextBox5.Value
Sheet1.Cells(a, "G") = TextBox6.Value
Sheet1.Cells(a, "H") = TextBox7.Value
Sheet1.Cells(a, "I") = TextBox8.Value
Sheet1.Cells(a, "J") = TextBox9.Value
TextBox1.Value = ""
TextBox1.SetFocus
|
|