I have tried searching for this answer but have come up short. I have 2 macros and its actions are the same: RunCode MyFunction. MyFunction runs daily (Macro1) and at the end of the month(Macro2) and each report outputs differently based on the macro(Macro 1 goes to PDF and Macro 2 goes to Excel). Is there a way in MyFunction to find out which macro is running so I can decide how to format the report?