Excel - macro or vb for deletion?

  • Thread starter Thread starter Inquirerer
  • Start date Start date
I

Inquirerer

Anyone know how to setup a command to auto delete a row in excel?
 
Rightclick the sheet tab, choose "view code", paste this in:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target(1).EntireRow.Delete
End Sub

Now any row you select in that sheet will be deleted.

HTH. Best wishes Harald
 

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