• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Run-Time Error '424'

comp764

Member
Hello everyone,
Wondering if someone can help me out here. I know very little about vba. I am trying to capture data from a UserForm into an excel spreadsheet. But every time I run the code I get this code: Run-Time Error '424' object required. I have excel 2007
Here is the code I'm trying to run

Private Sub CommandButton1_Click()
eRow = CheckingCal.Cells(Rows.Count, 1).End(x1up).Offest(1, 0).Row
Cells(eRow, 1) = TextBox1.Text
Cells(eRow, 3) = TextBox2.Text
Cells(eRow, 4) = TextBox3.Text
Cells(eRow, 5) = TextBox4.Text

End Sub

Private Sub CommandButton2_Click()
Unload Me
End Sub

Thank you
 
It probably doesn't know what to make of CheckingCal. Is it a globally set sheet variable?
In any event, there are a couple of things wrong with:
eRow = CheckingCal.Cells(Rows.Count, 1).End(x1up).Offest(1, 0).Row
Thet red one should be a letter L in lower case, and it's offset, not offest.
 
Hi, comp764!
From the VBA editor, press Alt-D and then L (Debug, Compile VBA Project) to check most (not all) syntax errors. This will save you testing and debugging time.
Regards!
 
Back
Top