excel runtime 1004

L

lmnorms1

I am putting a front end on an excel worksheet. I got the basics input
and I am testing it with one field. I get a runtime error of 1004.
Application-defined or Object-define error.

Here is my code:
Private Sub cmdAdd_Click()

Dim iRow As Long
Dim ws As New Worksheet
Set ws = Worksheets("MayerInsInfo")

'find the first row in the sheet
iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(2, 0)

'copy the data to the database
ws.Cells(iRow, 2) = Me.txtFName.Value <-- highlights with error.

End Sub


Any suggestions would be greatly appreciated.
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top