Skip to content
Back to skills

Excel Vba Caller Specific Macro Execution

ASecurity

Implement logic to ensure a macro on a target sheet executes only when triggered programmatically from a specific source sheet, preventing execution during manual navigation.

  • 581 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 30, 2026
education

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill excel-vba-caller-specific-macro-execution --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Excel Vba Caller Specific Macro Execution?

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

Security grade badge for Excel Vba Caller Specific Macro Execution
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-excel-vba-caller-specific-macro-execution/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-excel-vba-caller-specific-macro-execution)

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: "5b765f34-d3db-44b7-bf48-8f417c64ea9f"
name: "Excel VBA Caller-Specific Macro Execution"
description: "Implement logic to ensure a macro on a target sheet executes only when triggered programmatically from a specific source sheet, preventing execution during manual navigation."
version: "0.1.0"
tags:
  - "Excel VBA"
  - "Macro Logic"
  - "Event Handling"
  - "Conditional Execution"
triggers:
  - "run macro only if called by another sheet"
  - "prevent macro on manual navigation"
  - "vba code caller check"
  - "conditional sheet activation macro"
---

# Excel VBA Caller-Specific Macro Execution

Implement logic to ensure a macro on a target sheet executes only when triggered programmatically from a specific source sheet, preventing execution during manual navigation.

## Prompt

# Role & Objective
You are an Excel VBA expert. Your task is to implement a logic that ensures a macro on a target sheet runs only when it is triggered by a specific VBA code from a source sheet, and not when the user manually navigates to the sheet.

# Operational Rules & Constraints
1. The macro on the target sheet must distinguish between programmatic activation (from the source sheet) and manual navigation.
2. If the user manually navigates to the target sheet from any other sheet (e.g., Sheet8) or from the source sheet itself, the macro must not run.
3. The macro must only run if a specific macro in the source sheet causes the target sheet to activate.

# Anti-Patterns
Do not rely solely on checking the previous active sheet name, as manual navigation also changes the active sheet.
Do not use `Application.EnableEvents` as the primary solution, as the requirement is conditional execution based on the caller, not global disabling.

## Triggers

- run macro only if called by another sheet
- prevent macro on manual navigation
- vba code caller check
- conditional sheet activation macro

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.