Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
Greetings,
I think I've gotten closer; however I'm getting a "run time error" followed by a long number. In the same error messge box I get "Method 'Value' of object out of 'Range' failed.
I changed the first column to a Custom Format to a "dd mmm yy". I have a Header Row in Row 1. I have a total 6 columns, but only the first five I need the User Form for. The last column is just the day of the month. (For a Pivot Table).
Thank you,
I think I've gotten closer; however I'm getting a "run time error" followed by a long number. In the same error messge box I get "Method 'Value' of object out of 'Range' failed.
I changed the first column to a Custom Format to a "dd mmm yy". I have a Header Row in Row 1. I have a total 6 columns, but only the first five I need the User Form for. The last column is just the day of the month. (For a Pivot Table).
VBA Code:
Sub Submit()
Dim sh As Worksheet
Dim iRow As Long
Set sh = ThisWorkbook.Sheets("Activity")
iRow = [Counta(Activity!A:A)] + 1
With sh
.Cells(iRow, 1).Value = CDate(frmForm.Txtdate)
.Cells(iRow, 2) = frmForm.Txtmsn.Value
.Cells(iRow, 3) = frmForm.Cmbmode.Value
.Cells(iRow, 4) = frmForm.Cmbdentonfms.Value
.Cells(iRow, 5) = frmForm.Txtweight.Value
End With
End Sub
Thank you,