Suppose I have two workbooks open. In one (File1) I have a macro that runs every x minutes and a sheet called sheet1. In the other (File2) I have other macros but not a sheet called sheet1. If my active workbook is File2 but the macro that runs is the one from File1 I will get a runtime error for obvious reasons. Is there a way to have the macro that runs every x minutes to run ONLY on File1?
I could do if ThisWorkbook.Name <> "File1.xlsm" then ____
What is the code that makes File1 the activeworkbook.
Thank you.
I could do if ThisWorkbook.Name <> "File1.xlsm" then ____
What is the code that makes File1 the activeworkbook.
Thank you.