[RESOLVED] Close.xls file by a macro
Hi Experts,
I have a problem & looking for a macro that will do the below things
I downloaded an .xls file, as soon as file is downloaded it opens up automatically & I have file name macro1.xlsm & I need a macro that will close that .xls file by a macro (I will put the macro in macro1.xlsm & whenever I download that file & it will open automatically then I will open macro1.xlsm & I will run the macro & that file will be closed
Thnx for the Help
I am looking for a VBA macro & Yes I can do it manually but I will not do it manually(I have reasons for that)
Re: Close.xls file by a macro
if the macro will be in the workbook you want to close
Code:
thisworkbook.close, false ' true if you want to save it
if that is the only workbook open and you want to close excel as well, add
if the macro is in someother workbook then
Code:
workbooks("macro1.xlsm").close false
Re: Close.xls file by a macro
Thnx Alot Westconn1 Sir for helping me in solving this problem
Problem Solved
Have a Awesome Day