|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
点击窗体查看代码
- Private Sub 保存_Click()
- If 姓名.Value = "" Or 电话.Value = "" Or 单位.Value = "" Then
- MsgBox "信息输入不完整,请重新输入", vbExclamation, "错误提示"
- Exit Sub
- End If
- Dim xrow As Integer
- xrow = Range("a1").CurrentRegion.Rows.Count + 1
- Cells(xrow, "A") = 姓名.Value
- Cells(xrow, "B") = 电话.Value
- Cells(xrow, "C") = 单位.Value
- Cells(xrow, "D") = 备注.Value
- 姓名.Value = ""
- 电话.Value = ""
- 单位.Value = ""
- 备注.Value = ""
- End Sub
- Private Sub 退出_Click()
- Unload Me
- End Sub
复制代码 |
|