![]() |
Close Workbook from Macro
I have workbook A.xls in which I run a macro that will
import a text file (B.txt) and save it as B.xls. Can I incorporate a statement in my macro in A.xls that will close A.xls at the end? TIA. |
Close Workbook from Macro
If you want to save before close
Thisworkbook.Close Tru if you want the workbook close without save Thisworkbook.Close Fals Regards http://www.vonixx.co ----- Lou wrote: ---- I have workbook A.xls in which I run a macro that will import a text file (B.txt) and save it as B.xls Can I incorporate a statement in my macro in A.xls that will close A.xls at the end TIA |
Close Workbook from Macro
Lou
Just include this as your last line of code Workbooks(ThisWorkbook.Name).Close SaveChanges:=Fals -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 03:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com