Hi,
I am trying to enter data through a form to an Excel table.
But the the data is not going to the table but it starts just below the table and the data entered doesn't belong to the table. All data entry procedures works fine. Just it doesn't enter into the table.
Here is the code I used for the button to enter data.
What can I edit here to fulfill my requirement?
Thanks a lot
I am trying to enter data through a form to an Excel table.
But the the data is not going to the table but it starts just below the table and the data entered doesn't belong to the table. All data entry procedures works fine. Just it doesn't enter into the table.
Here is the code I used for the button to enter data.
Code:
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("MatchData")
Dim n As Long
'Find the last available row
n = ws.Range("A" & Application.Rows.Count).End(xlUp).Row
ws.Range("A" & n + 1).Value = Me.cboTeam1
ws.Range("B" & n + 1).Value = Me.cboTeam2
ws.Range("C" & n + 1).Value = CInt(Me.txtTeam1Run)
ws.Range("D" & n + 1).Value = CDbl(Me.txtTeam1Over)
ws.Range("E" & n + 1).Value = CInt(Me.txtTeam2Run)
ws.Range("F" & n + 1).Value = CDbl(Me.txtTeam2Over)
ws.Range("G" & n + 1).Value = Me.chkTie
ws.Range("H" & n + 1).Value = Me.chkNR
What can I edit here to fulfill my requirement?
Thanks a lot