Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Delete a row that is double clicked

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?




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Delete a row that is double clicked

Hi Robert,

Am Tue, 9 Apr 2013 03:13:43 -0700 schrieb Robert Crandal:

Rows("12:12").Select


try:
Target.EntireRow.Delete


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Delete a row that is double clicked

"Claus Busch" wrote:

try:
Target.EntireRow.Delete


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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel files not opening when double clicked Dale Fye Excel Discussion (Misc queries) 4 March 15th 08 04:00 PM
Executing Code When Cell Is Double Clicked. Stever Excel Programming 1 November 3rd 06 06:36 PM
UserForms and double-clicked worksheets... Dan Excel Programming 1 March 18th 06 05:35 AM
Change cell value when right-clicked/double-clicked grime[_5_] Excel Programming 5 October 17th 05 01:52 PM
VB6, How do i open (instead of edit) an excel OLE doc when it is double clicked? TexN Excel Programming 1 October 17th 05 12:04 PM


All times are GMT +1. The time now is 10:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"