Private Sub SaveButton_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ws.Cells(iRow, 1).Value = Me.Name.Text
ws.Cells(iRow, 2).Value = Me.Birthday.Text
ws.Cells(iRow, 3).Value = Me.Birthplace.Text
ws.Cells(iRow, 4).Value = Me.Age.Text
ws.Cells(iRow, 5).Value = Me.ResidenceAddress.Text
ws.Cells(iRow, 6).Value = Me.BusinessAddress.Text
ws.Cells(iRow, 7).Value = Me.Occupation.Text
ws.Cells(iRow, 8).Value = Me.SpecificDuties.Text
ws.Cells(iRow, 9).Value = Me.Height.Text
ws.Cells(iRow, 10).Value = Me.Weight.Text
ws.Cells(iRow, 11).Value = Me.ContactNo.Text
ws.Cells(iRow, 12).Value = Me.GovernmentId.Text
ws.Cells(iRow, 13).Value = Me.AnnualIncome.Text
ws.Cells(iRow, 14).Value = Me.Mother.Text
ws.Cells(iRow, 15).Value = Me.Email.Text
ws.Cells(iRow, 16).Value = Me.Beneficiaries.Text
ws.Cells(iRow, 17).Value = Me.SourceofIncome.Text
ws.Cells(iRow, 18).Value = Me.EducationalAttainment.Text
ws.Cells(iRow, 19).Value = Me.SpouseInformation.Text
End Sub
你能帮我们帮忙吗?我不知道为什么我会得到一个"无效资格赛"此代码中的错误。这只是excel中的简单数据输入表单。