Skrej
Board Regular
- Joined
- May 31, 2013
- Messages
- 149
- Office Version
- 365
- Platform
- Windows
Hi,
I have a button on a user form, than when clicked is giving me an Argument not Optional Error, and I can't see what I'm missing.
Here's the code from the userform,
And, here's the subroutine I'm trying to call.
Tried going through and commenting out each line, but I still get the error even after commenting everything out. Have tried changing some variable names, no difference.
I have essentially the same subroutine for another button that just references different text boxes on the user form, and it works fine.
Any suggestions as to what I'm overlooking?
I have a button on a user form, than when clicked is giving me an Argument not Optional Error, and I can't see what I'm missing.
Here's the code from the userform,
Code:
Private Sub cmdUpdate_Click()
UpdateTextBoxes
End Sub
And, here's the subroutine I'm trying to call.
Code:
Sub UpdateTextBoxes(Record_Number As Long)
Dim Row As Long
Row = Record_Number
With ThisWorkbook.Sheets("Data")
.Cells(Row, "A").Value = ESLtester.tboUpdateName.Value
.Cells(Row, "B").Value = ESLtester.tboUpdateID.Value
.Cells(Row, "C").Value = Cells(Row, "C").Offset(0, 2)
.Cells(Row, "D").Value = Cells(Row, "D").Offset(0, 3)
.Cells(Row, "E").Value = ESLtester.tboUpdateTest.Value
.Cells(Row, "F").Value = ESLtester.tboUpdateScore.Value
.Cells(Row, "G").Value = ESLtester.tboUpdateDate.Value
End With
ShowCurrentRecord
End Sub
Tried going through and commenting out each line, but I still get the error even after commenting everything out. Have tried changing some variable names, no difference.
I have essentially the same subroutine for another button that just references different text boxes on the user form, and it works fine.
Any suggestions as to what I'm overlooking?