Macro to save excel sheet in a workbook

J

jesusmylight

I have an application that export an excel workbook. The workbook has
many tabs. I have created a macro to save each tab as a different file
name in specific folders. This works well-on the file that the macro
was created in. However on export of the excel workbook the file name
changes, that being the case, i am looking for some help on adding
this macro to excel and have it use on any excel file/workbook.

Please let me know if there is anyway to do this.

Regards.
 
D

Dave Peterson

Instead of refering to the workbook by name (or using ThisWorkbook), you may be
able to use ActiveWorkbook instead.

Then your code will be running against whatever workbook is active.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top