我是 VBA 的新手,并且对此用户窗体的输出有问题。
Private Sub btnSubmit_Click()
Dim RowCount As Long
...
RowCount = Worksheets("Assignments").Range("A3").CurrentRegion.Rows.Count
With Worksheets("Assignments").Range("A3")
.Offset(RowCount, 0).Value = Me.txtReportAddress.Value
.Offset(RowCount, 1).Value = Me.cmbCityCounty.Value
.Offset(RowCount, 2).Value = Me.txtFee.Value
.Offset(RowCount, 3).Value = Me.txtDate.Value
.Offset(RowCount, 4).Value = Me.cmbPropertyType.Value
.Offset(RowCount, 5).Value = Me.txtComments.Value
End With
它给出了正确的输出,但任何后续条目都会覆盖过去的整体。
任何帮助表示赞赏!