Good evening/morning/afternoon all,

I am trying my luck with macros (I am a beginner) and I am using one to transfer data from a user form to a spreadsheet. However, I am getting an error code

error 1004, application-defined or object-defined error

Below is the code I am using, let me know if you need any other information though and any guidance will be hugely appreciated

Private Sub cmd_Create_Click()

Dim iRow As Long
Dim ws As Worksheet
Set wsh = Worksheets("Header")
Set wsl = Worksheets("Lines")

'find first empty row in database
iRow = wsh.Cells(Rows.Count, 1)
    
'copy the data to the database
wsh.Cells(iRow, 1).Value = Me.txt_QuoteID.Value
wsh.Cells(iRow, 2).Value = Me.txt_Type.Value
wsh.Cells(iRow, 3).Value = Me.txt_CustType.Value
wsh.Cells(iRow, 4).Value = Me.txt_AccNo.Value
wsh.Cells(iRow, 5).Value = Me.txt_CustName.Value


End Sub
Thanks, Katie