Hi all,
Running into some problems with my code. I am trying to add multiple information lines for one project ID. The idea is there are multiple Agencies that would work on each project so in the userform I have it set up that you can add all of these at once that way there is less margin for error.
I want the information to populate in separate rows so that I may apply filters for report generating.
The problem I am having with the following code is that the projectID populates in the right place but the other information does not. The second entry populates where the first entry should be.
Any help with this would be greatly appreciated!
Thanks,
Wolfman
RowCount = Worksheets("Permitting Agency Information").Range("A2").CurrentRegion.Rows.Count 'Outlines the data that will populate into the Permitting Agency Worksheet
With Worksheets("Permitting Agency Information").Range("A2")
.Offset(RowCount, 0).Value = Me.txtProjectID.Value
.Offset(RowCount, 1).Value = Me.txtPermitAgencyName1.Value
.Offset(RowCount, 2).Value = Me.cmboPermitStatus1.Value
.Offset(RowCount, 3).Value = Me.txtApplicationDate1.Value
.Offset(RowCount, 4).Value = Me.txtPermitNumber1.Value
End With
If Not txtPermitAgencyName2.Value = "" Then
RowCount = Worksheets("Permitting Agency Information").Range("A2").CurrentRegion.Rows.Count
With Worksheets("Permitting Agency Information").Range("A2")
.Offset(RowCount, 0).Value = Me.txtProjectID.Value
.Offset(RowCount, 1).Value = Me.txtPermitAgencyName2.Value
.Offset(RowCount, 2).Value = Me.cmboPermitStatus2.Value
.Offset(RowCount, 3).Value = Me.txtApplicationDate2.Value
.Offset(RowCount, 4).Value = Me.txtPermitNumber2.Value
End With
End If
Bookmarks