Delete a row that is double clicked

R

Robert Crandal

What is a quick and fast way to delete a row that is
double clicked by the user?

I know I must handle the Worksheet_BeforeDoubleClick()
function and the "Target" parameter. What comes next?

Using Excel's "Record Macro" function, it generated the
following code to delete a row: (Row 12 was clicked here)

Rows("12:12").Select
Selection.Delete Shift:=xlUp

I need to somehow incorporate the "Target" parameter into
the Rows object, right?
 
R

Robert Crandal

Claus Busch said:
try:
Target.EntireRow.Delete

Awesome! I like that better than the code that Excel's
"Record Macro" function generates. Thanks!
 

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