I have another issue where I'm stumped, I've used this same code on 5 different other forms and it performs as it should on them but on my current worksheet, it continues to "overwrite" the previous data instead of moving to the next line in the table. My code is as follows:
The only difference with this form is that I change the numbers entered into percentages, code example as follows:
but this 'should' have nothing to do with the information from the user pasting in on a separate line what am I missing?
Code:
On Error Resume Next
' Write data to worksheet
RowCount = Worksheets("CoreConSummary").Range("AH1").CurrentRegion.Rows.Count
With Worksheets("CoreConSummary").Range("AH1")
.Offset(RowCount, 0).Value = Me.txt_SiteWrk.Value
.Offset(RowCount, 1).Value = Me.txt_VESTIBULE.Value
.Offset(RowCount, 2).Value = Me.txt_CHKOUT.Value
.Offset(RowCount, 3).Value = Me.txt_PHOTOLAB.Value
.Offset(RowCount, 4).Value = Me.txt_MINCLINIC.Value
.Offset(RowCount, 5).Value = Me.txt_RETAIL.Value
.Offset(RowCount, 6).Value = Me.txt_SOA.Value
.Offset(RowCount, 7).Value = Me.txt_PHARMACY.Value
.Offset(RowCount, 8).Value = Me.txt_EMPAREA.Value
.Offset(RowCount, 9).Value = Me.txt_RECVAREA.Value
.Offset(RowCount, 10).Value = Me.txt_RRMS.Value
.Offset(RowCount, 11).Value = Me.txt_GENCOND.Value
.Offset(RowCount, 12).Value = Me.txt_PROFIT.Value
.Offset(RowCount, 13).Value = Format(Now, "mm/dd/yyyy hh:nn:ss")
End With
' Clear the form
For Each ctl In Me.Controls
If TypeName(ctl) = "TextBox" Or TypeName(ctl) = "ComboBox" Then
ctl.Value = ""
ElseIf TypeName(ctl) = "CheckBox" Then
ctl.Value = False
End If
Next ctl
End Sub
The only difference with this form is that I change the numbers entered into percentages, code example as follows:
Code:
Private Sub txt_SiteWrk_AfterUpdate()
txt_SiteWrk.Value = Format(txt_SiteWrk.Value / 100, "0.0%")
End Sub
but this 'should' have nothing to do with the information from the user pasting in on a separate line what am I missing?