Hi guys,
I'm pretty new to this. I'm trying to set up a way for school groups to enter their students information for programs we run, and I'm having trouble getting the Userform to enter the data into an excel sheet.
I'm currently getting Runtime Error 9, Subscript out of Range for the following section of code;
Dim lrTestform As Long 'enter data to sheet
lrTestform = Sheets("Testform").Range("B" & Rows.Count).End(xlUp).Row
Sheets("Testform").Cells(lrTestform + 1, "B").Value = Firstname.Text
Sheets(“Testform”).Cells(lrTestform + 1, “C”).Value = Me.Lastname.Text
Sheets(“Testform”).Cells(lrTestform + 1, “D”).Value = Me.age.Value
Sheets(“Testform”).Cells(lrTestform + 1, “E”).Value = Me.Gender.Value
Sheets(“Testform”).Cells(lrTestform + 1, “F”).Value = Me.Grade.Value
Sheets(“Testform”).Cells(lrTestform + 1, “G”).Value = Me.Discepline.Value
Sheets(“Testform”).Cells(lrTestform + 1, “H”).Value = Me.shoesize.Value
Sheets(“Testform”).Cells(lrTestform + 1, “I”).Value = Me.HT.Value
Sheets(“Testform”).Cells(lrTestform + 1, “J”).Value = Me.weight.Value
Sheets(“Testform”).Cells(lrTestform + 1, “K”).Value = Me.Skier.Value
Sheets(“Testform”).Cells(lrTestform + 1, “L”).Value = Me.Ability.Value
Sheets(“Testform”).Cells(lrTestform + 1, “M”).Value = Me.Lessons.Value
Sheets(“Testform”).Cells(lrTestform + 1, “N”).Value = Me.Rentals.Value
Sheets(“Testform”).Cells(lrTestform + 1, “O”).Value = Me.LiftPass.Value
Sheets(“Testform”).Cells(lrTestform + 1, “P”).Value = Me.Helmet.Value
Help?
I'm really new to this, and I'm trail and erroring things.
Bookmarks