Selection Failed

  • Thread starter Thread starter Fernando Ortiz
  • Start date Start date
F

Fernando Ortiz

Hi Excel Experts:

I am working on a macro and find this

The CommandButton1 is in the sheet1 and when click on it, the code failed
and error 1004 apears

I dont't understand why.

This code is on the sheets1

Private Sub CommandButton1_Click()
Sheets(2).Select
RowEmpty = Range("A1").CurrentRegion.Rows.Count + 1
Cells(RowEmpty, 1).Select
End Sub

Thanks a lot for any advice.

Regards,


Fernando Ortiz
 
I just tested with a regular button/shape and it worked just fine. I do NOT
like using the command buttons. Look at the forms tools for your button.
 
Hi Fernando

If you use Excel 97? then

Change the takefocusonclick property to false of the button
This is a bug in Excel 97
 

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

Back
Top