Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to Close a specific workbook. | Excel Discussion (Misc queries) | |||
Macro to close workbook with prompt | Excel Worksheet Functions | |||
Macro to close workbook and re-open new copy | Excel Discussion (Misc queries) | |||
run macro on workbook close | Excel Discussion (Misc queries) | |||
Close current Workbook after calling macro in other | Excel Programming |