![]() |
Close specific workbook
I have one workbook that has a macro that imports a .txt or .dat file,
processes it then saves it to a specified location. At the end of the macro, I tried closing the ActiveWorkbook but that ended up being the 'new' file I created. How do I close the 'source' file (the filet that is running the macro)? |
Close specific workbook
try Thisworkbook.Close
"Robert_L_Ross" wrote: I have one workbook that has a macro that imports a .txt or .dat file, processes it then saves it to a specified location. At the end of the macro, I tried closing the ActiveWorkbook but that ended up being the 'new' file I created. How do I close the 'source' file (the filet that is running the macro)? |
Close specific workbook
DOH! Genius!!
Thanks! "Joel" wrote: try Thisworkbook.Close "Robert_L_Ross" wrote: I have one workbook that has a macro that imports a .txt or .dat file, processes it then saves it to a specified location. At the end of the macro, I tried closing the ActiveWorkbook but that ended up being the 'new' file I created. How do I close the 'source' file (the filet that is running the macro)? |
All times are GMT +1. The time now is 04:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com