Error 1004 when selecting a range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code in a Macro and it works fine. When I copy it to a click event for command button I get a Run-time error 1004 "Select Method of Range class failed.

Sheets("SOAUDITSO").Select
Rows("2:2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp

What am I doing wrong?
 

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