I'm not sure if this is possible, and most likely beyond my capabilities.
I have an Excel template with many Subs and Functions which I am finding it difficult to follow what is happening, or in the order of what is happening.
I want to add a simple SaveAs bit of code for an Excel file that is automated via a CMM (Coordinate Measuring Machine) software.
This software reads from three different txt files and places data on a worksheet (Which it names "Report") and somewhere, either in the beginning or near the end of the macro(s) a workbook name is created.
The way these macros are written and broken into so many routines is difficult to follow or figure out flow.
The workbook name is generated from one or more of the three txt files used.
In our process of running parts on the CMM, these excel workbooks are generated automatically.
My best guess, is, if I can determine which macro and or line of the macro that runs last, I may be able to insert the "SaveAs" code to automatically save the workbook.
its manually saved now, and far too many times when in a rush, it isn't saved.
Is there a way with VBA to determine the last Sub/Function and or line of code executed?
The zip file attached has a .xlt and a .xls file.
Bookmarks