Private Sub CommandButton1_Click()
Dim wk As Workbook
Dim wt As Worksheet
Set wk = Workbooks("book20.xls")
Set wt = Worksheets("员工信息表")
wt.Activate
With Me
wt.Cells(xiugairow, 1).Value = .TextBox1.Value
If .OptionButton1.Value Then
wt.Cells(xiugairow, 1).Value = "男"
Else
wt.Cells(xiugairow, B).Value = "女"
End If
wt.Cells(xiugairow, 3).Value = .TextBox2.Value
wt.Cells(xiugairow, 4).Value = .ComboBox1.Value
wt.Cells(xiugairow, 5).Value = "'" & .TextBox3.Value
wt.Cells(xiugairow, 6).Value = .TextBox4.Value
wt.Cells(xiugairow, 7).Value = "'" & .TextBox5.Value
wt.Cells(xiugairow, 8).Value = .TextBox6.Value
wt.Cells(xiugairow, 9).Value = .ComboBox2.Value
wt.Cells(xiugairow, 10).Value = .ComboBox3.Value
MsgBox "成功修改员工信息!", vbOKOnly, "修改员工信息"
End With
Set wk = Nothing
Set wt = Nothing
Unload xiugaiyg
jiemian.Show
End Sub