Macro code produces different results when run directly from code vs word art trigger

Copper Contributor

Hello,

 

I'm currently having some difficulty with macros on Excel. I have a spreadsheet with a macro that takes a spreadsheet as input, parses the data, then outputs 3 different spreadsheets. When I run the code directly from the editing interface within Excel, the code works correctly.

 

When I trigger and run the code from a word art button, the input still takes in a spreadsheet, however, the output is different. It only outputs 3 copies of the last spreadsheet that it was supposed to produce. While the titles of these spreadsheets are correct, all 3 spreadsheets are exactly the same and are all copies of the 3rd spreadsheet that was supposed to be outputted. I'm lost on why the code performs differently when run from a word art button and directly from the editing interface.

 

Thanks for your help!

1 Reply
It helps if you share your code. If you run the code "from the editing interface", what exactly does that mean? Is the same workbook/worksheet active when you use either method?