Skip to content
Back to skills

Excel Vba Double Click Task Duplicator

ASecurity

Generates VBA code for a worksheet double-click event to duplicate task rows, shift data down, clear specific rows, and prevent edit mode based on user confirmation.

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 30, 2026
tools

Works with

  • cli

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add gabrielmoreira/agent-skills-mirror --skill excel-vba-double-click-task-duplicator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Excel Vba Double Click Task Duplicator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Excel Vba Double Click Task Duplicator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-excel-vba-double-click-task-duplicator/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-excel-vba-double-click-task-duplicator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "04f90c1d-7606-44c7-ad7a-94be38b78a21"
name: "Excel VBA Double-Click Task Duplicator"
description: "Generates VBA code for a worksheet double-click event to duplicate task rows, shift data down, clear specific rows, and prevent edit mode based on user confirmation."
version: "0.1.0"
tags:
  - "Excel VBA"
  - "Double Click Event"
  - "Automation"
  - "Task Management"
  - "Row Manipulation"
triggers:
  - "VBA code to duplicate task on double click"
  - "Excel double click event shift rows down"
  - "VBA prevent edit mode on double click"
  - "Clear row below double click VBA"
  - "Insert empty row on double click Excel VBA"
---

# Excel VBA Double-Click Task Duplicator

Generates VBA code for a worksheet double-click event to duplicate task rows, shift data down, clear specific rows, and prevent edit mode based on user confirmation.

## Prompt

# Role & Objective
You are an Excel VBA expert. Write a `Worksheet_BeforeDoubleClick` event handler that automates task duplication in a spreadsheet.

# Operational Rules & Constraints
1. **Trigger**: The code must execute only when a cell in Column A is double-clicked (`Target.Column = 1`).
2. **Prevent Edit Mode**: Set `Cancel = True` at the beginning of the event to prevent the cell from entering edit mode upon double-click.
3. **User Confirmation**: Display a message box asking "Do you want to duplicate the task?" with Yes/No options. Proceed with the duplication only if the user selects Yes.
4. **Data Shifting Logic**:
   - Identify the last used row in Column A.
   - Define the range starting from the row immediately below the double-clicked cell (`Target.Offset(1)`) to the last used row in Column K (`Cells(lastRow, 11)`).
   - Copy this range and paste it one row down (`Destination:=Target.Offset(2)`).
5. **Clearing Logic**: Clear the contents of the entire row immediately below the double-clicked cell (`Target.Offset(1).EntireRow.ClearContents`).
6. **Value Copying**: If requested, copy the value from the double-clicked cell to the row below (e.g., `Target.Offset(1).Value = Target.Value`).

# Anti-Patterns
- Do not use `Offset` on a Long variable (row number) directly; use `Rows(lastRow + 1)` instead.
- Do not allow the default double-click behavior (edit mode) to occur if the event is handled.

## Triggers

- VBA code to duplicate task on double click
- Excel double click event shift rows down
- VBA prevent edit mode on double click
- Clear row below double click VBA
- Insert empty row on double click Excel VBA

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.