Yeah, it's that confusing. I have three workbooks. As workbook1 opens, from the task scheduler, it checks for a date and if its todays date, it runs a code. A later part of that code opens Workbook 2 and paste certain info into it. Heres the problem. I also have code that runs when WB2 is opened. (Workbook_Open) This code is overwriting what the first code is supposed to do in workbook2. Instead of finishing the code out from WB1, it runs the code from the workbook OpenWorkbook function. So, all 3 workbooks do almost the exact same things. I have them opening on a scheduled task. When they open the Open_workbook function runs. I guess what I need is for the open workbook function ( in WB2) to only run when the workbook is opened from the "scheduled task" opening it....not the other workbook code. Same for WB3. I need the OpenWorkbook function to run ONLY when the task scheduler opens it, not the other workbook. Is this even possible?
Bookmarks