Here is the code in a code tag. Also I have attached the spreadsheet for those of you kind enough to take a look at it. This is my first form, so please be kind.
Private Sub cmdAdd_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("LockClub-Sports")
iRow = ws.Cells.Find(What:="*", SearchOrder:=xlRows, SearchDirection:=xlPrevious, LookIn:=xlValues).Row + 1
If Trim(Me.txtdate.Value) = "" Then
Me.txtdate.SetFocus
MsgBox "Please enter a date"
Exit Sub
End If
ws.Cells(iRow, 2).Value = Me.txtdate.Value
ws.Cells(iRow, 3).Value = Me.txtsport.Value
ws.Cells(iRow, 4).Value = Me.txtteam.Value
ws.Cells(iRow, 5).Value = Me.txtunit.Value
ws.Cells(iRow, 6).Value = Me.txtline.Value
ws.Cells(iRow, 7).Value = Me.txtbet.Value
ws.Cells(iRow, 8).Value = Me.txttowin.Value
ws.Cells(iRow, 9).Value = Me.txtwl.Value
ws.Cells(iRow, 10).Value = Me.txtwl2.Value
Me.txtdate.Value = ""
Me.txtsport.Value = ""
Me.txtteam.Value = ""
Me.txtunit.Value = ""
Me.txtline.Value = ""
Me.txtbet.Value = ""
Me.txttowin.Value = ""
Me.txtwl.Value = ""
Me.txtwl2.Value = ""
Me.txtdate.SetFocus
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub ComboBox1_Change()
End Sub
Private Sub UserForm_Click()
End Sub
Bookmarks