0
我是VBA的新品牌,並且遇到此UserForm的輸出問題。VBA Excel - 在編寫之前檢查單元格內容
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
它給正確的輸出,但任何後續條目將覆蓋過去entires。
任何幫助表示讚賞!