Open run Macro and Close Excel file plus delete another file
Posted on 2014-04-10
I have bespoke application that exports a CSV file as 'EXPORT.csv' to my desktop, this file is used to update an Excel spreadsheet called 'SPECIFICATION.xlsx' which has a Macro within called 'CSVSETUP' that will load the 'EXPORT.csv' file to update 'SPECIFICATION.xlsx' - and my application can call a program that should enable me to run this in the background when 'EXPORT.csv' is sent to the desktop.
What i wish to do is to simply call 'SPECIFICATION.xlsx' and open it to run the Macro, Save 'SPECIFICATION.xlsx' and Close it when the Macro has finished running plus Delete 'EXPORT.csv' from the Desktop when this process is completed.
What would be the easiest method to do this task and how should any code required to do this be written?
Thank you, in advance of any reply?