Hi,
I need a macro to close all open workbooks except two of them, named say ab_cd_de.xlsm and fg_hi_jk.xlsx. (using these weird formats because the actual file names are similar (long names with many underscores).
The macro is located in the ab_cd_de file.
I am using the following macro:
I have also tried using the following code:
Both of the codes above fail to retain the two excluded files above and close one of them as well.
In effect I am left with only the fg_hi file for the first stretch of code and the ab_cs file for the second stretch.
Is there any way that I can ensure both of the files remain open after the operation?
Bookmarks