哪些地方需要修改
追答Sub Note()
Dim TempMsgbox As VbMsgBoxResult
Dim count As Integer
With userform1
If .编号.Text = "" Or .姓名.Text = "" Or .部门.Text = "" Or .职位 = "" Or _
.身份证号.Text = "" Or .入职日期.Text = "" Or .学历.Text = "" Then
TempMsgbox = MsgBox("请输入完整的信息!", vbOKOnly & vbInformation, "系统提示")
End
End If
count = 0
Range("A2").Select
Do Until Selection.Offset(count).Value = ""
If .编号.Text = Selection.Offset(count).Value Then
TempMsgbox = MsgBox("该员工编号已经登记,请重新输入!", vbokonlly & _
vbInformation, "提示")
End
End If
count = count + 1
Loop
'这里接着写你自己原来的代码
End With
End Sub
如果直接用你自己的代码,在分行的_前加上一个空格即可。第一个do循环的value前少了一个点
你只需要检查你的红色的部分,那就是有错的地方