Skip to content
Skillv1.0.0

Excel VBA Print-Save-Clear-Increment Automation

Generates VBA code for an Excel button that executes a specific workflow: printing 3 copies with unique cell marks, saving a copy with a dynamic filename, clearing a data range, incrementing a counter

by David-Li0406(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from David-Li0406/meta-skill-evloving (AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/excel-vba-print-save-clear-increment-automation/SKILL.md). Install upstream with npx skills add David-Li0406/meta-skill-evloving --skill excel-vba-print-save-clear-increment-automation. Copyright stays with the author.

Excel VBA Print-Save-Clear-Increment Automation

Generates VBA code for an Excel button that executes a specific workflow: printing 3 copies with unique cell marks, saving a copy with a dynamic filename, clearing a data range, incrementing a counter, displaying a message, and closing the workbook.

Prompt

Role & Objective

You are a VBA developer. Write a VBA subroutine for a button on Sheet1 that executes the following specific sequence of actions.

Operational Rules & Constraints

  1. Printing Loop: Implement a loop that runs 3 times to print the file:
    • Iteration 1: Place an 'x' mark in cell C58, print the file, then clear the 'x' from C58.
    • Iteration 2: Place an 'x' mark in cell D59, print the file, then clear the 'x' from D59.
    • Iteration 3: Place an 'x' mark in cell E60, print the file, then clear the 'x' from E60.
  2. Save Copy: Save a copy of the file to the path C:\avize\. The filename must be constructed using the values from cell F4 and cell D2.
  3. Clear Data: Clear the values in the cell range B16:G45.
  4. Increment Value: Change the value of cell D2 to be equal to D2 + 1.
  5. Message Box: Display a message box with the text "urmatorul aviz are valoarea" followed by the new value of D2.
  6. Save and Close: Save the current file and close the workbook automatically.
  7. Syntax: Use straight double quotes (") for strings and standard apostrophes (') for comments to avoid syntax errors.

Anti-Patterns

  • Do not use smart quotes or curly apostrophes.
  • Do not omit the final save and close steps.
  • Do not forget to clear the 'x' marks after each print iteration.

Triggers

  • vba code for button1 on sheet1
  • print 3 copies with x mark in specific cells
  • save copy of file in path C:\avize
  • clear cells value form range B16:G45
  • change value from cell D2 to D2+1

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/david-li0406-meta-skill-evloving-excel-vba-print-save-cl-ded923/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

david-li0406-meta-skill-evloving-excel-vba-print-save-cl-ded923.ocm.jsonjson
{
  "ocm": "1",
  "id": "david-li0406-meta-skill-evloving-excel-vba-print-save-cl-ded923",
  "kind": "skill",
  "name": "Excel VBA Print-Save-Clear-Increment Automation",
  "description": "Generates VBA code for an Excel button that executes a specific workflow: printing 3 copies with unique cell marks, saving a copy with a dynamic filename, clearing a data range, incrementing a counter, displaying a message, and closing the workbook.",
  "publisher": "David-Li0406",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "vba",
      "excel",
      "automation",
      "printing",
      "macro",
      "github"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Generates VBA code for an Excel button that executes a specific workflow: printing 3 copies with unique cell marks, saving a copy with a dynamic filename, clearing a data range, incrementing a counter, displaying a message, and closing the workbook."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github",
      "repository": "https://github.com/David-Li0406/meta-skill-evloving",
      "path": "AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/excel-vba-print-save-clear-increment-automation/SKILL.md",
      "ref": "ca3a335628981df10c36e00cb9850df2c247ab9a",
      "url": "https://github.com/David-Li0406/meta-skill-evloving/blob/ca3a335628981df10c36e00cb9850df2c247ab9a/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/excel-vba-print-save-clear-increment-automation/SKILL.md",
      "key": "David-Li0406/meta-skill-evloving/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/excel-vba-print-save-clear-increment-automation/SKILL.md"
    }
  },
  "instructions": "# Excel VBA Print-Save-Clear-Increment Automation\n\nGenerates VBA code for an Excel button that executes a specific workflow: printing 3 copies with unique cell marks, saving a copy with a dynamic filename, clearing a data range, incrementing a counter, displaying a message, and closing the workbook.\n\n## Prompt\n\n# Role & Objective\nYou are a VBA developer. Write a VBA subroutine for a button on Sheet1 that executes the following specific sequence of actions.\n\n# Operational Rules & Constraints\n1. **Printing Loop**: Implement a loop that runs 3 times to print the file:\n   - Iteration 1: Place an '",
  "cost": {
    "context_tokens": 462
  }
}

Fetch it by URL: GET /api/v1/registry/david-li0406-meta-skill-evloving-excel-vba-print-save-cl-ded923/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.