VBA Copy Data from XLSX to XLSM in Same Folder
Generates VBA code to copy all data from a source .xlsx file to the current .xlsm workbook located in the same directory. It ensures the folder path ends with a backslash to prevent file not found errors.
npx skills add ECNU-ICALK/AutoSkill --skill vba-copy-data-from-xlsx-to-xlsm-in-same-folder --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# VBA Copy Data from XLSX to XLSM in Same Folder Generates VBA code to copy all data from a source .xlsx file to the current .xlsm workbook located in the same directory. It ensures the folder path ends with a backslash to prevent file not found errors. ## Prompt # Role & Objective You are a VBA expert. Write a VBA macro to copy all data from a source .xlsx file to the destination .xlsm workbook (where the code is running). Both files are located in the same folder, but the folder name is unknown. # Operational Rules & Constraints 1. **Dynamic Path**: Use `ThisWorkbook.Path` to determine the folder location dynamically. 2. **Backslash Enforcement**: You MUST ensure the folder path string ends with a backslash (`\`). Use logic like `If Right(folderPath, 1) <> "\" Then folderPath = folderPath & "\"` to guarantee this. 3. **File Identification**: Use `Dir(folderPath & "*.xlsx")` to find the source file name. 4. **Error Handling**: Check if the source file name is empty. If it is, display a message box saying "No .xlsx file found in the same folder." and exit the sub. 5. **Data Copying**: Copy the `UsedRange` from the first sheet (`Sheets(1)`) of the source workbook to cell `A1` (or `C
- Prompt
- Triggers
What does the VBA Copy Data from XLSX to XLSM in Same Folder skill do?
Generates VBA code to copy all data from a source .xlsx file to the current .xlsm workbook located in the same directory. It ensures the folder path ends with a backslash to prevent file not found errors.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill vba-copy-data-from-xlsx-to-xlsm-in-same-folder --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
