agentsclimarketplace

Excel vba caller specific macro execution

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/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.From its SKILL.md

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

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.9 KB, 276 tokens by cl100k_base, as published. Nobody here has run it

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.