Good morning,
I need the totals row to remain at the bottom of my sheet, except my code in the form looks for the nearest blank row to place the next record in. Eventually it catches up to my total row and places the next record BELOW the total line. How can I keep my total line from appearing as the last record?
Thanks for the help. See attached HRDInfo.xlsm file.
Received the code for the problem and am posting it in case any one else has the same problem. I had to code the OK button with the following:
Private Sub cmdOK_Click()
Dim objList As ListObject
Dim objRow As ListRow
Set objList = ActiveWorkbook.Sheets(“HRDInfo”).ListObjects(1)
With objList.ListRows
Set objRow = .Add(, True)
End With
With objRow
.Range(1, 1).Value = txtName.Value
.Range(1, 2).Value = txtDate.Value
.Range(1, 3).Value = txtTraining.Value
.Range(1, 4).Value = txtHours.Value
.Range(1, 5).Value = txtStartDate.Value
.Range(1, 6).Value = txtCost.Value
.Range(1, 7).Value = txtHRDHours.Value
End With
End Sub
Hope it helps someone else.
Nannette