Macro to save excel sheet in a workbook

  • Thread starter Thread starter jesusmylight
  • Start date Start date
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.
 
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.
 
Back
Top