I'm stuck with this problem and need some help from people wiser than me:
I have a userform that lets the user select the file from the open files they want to run the macro to. It works like a charm as long as all the files are open on the same Excel instance but often times the files are open in other instances:
Is there a way to loop thought all the active files (or open windows) to check that all the Excel files are open on the same instance as the macro workbook? If they're not, the file should be saved (might need to use temp names for unsaved workbooks), closed and opened in the same instance as the macro workbook.
Thank you already in advance!
I have a userform that lets the user select the file from the open files they want to run the macro to. It works like a charm as long as all the files are open on the same Excel instance but often times the files are open in other instances:
Is there a way to loop thought all the active files (or open windows) to check that all the Excel files are open on the same instance as the macro workbook? If they're not, the file should be saved (might need to use temp names for unsaved workbooks), closed and opened in the same instance as the macro workbook.
Thank you already in advance!