ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Delete a workbook while in a macro (https://www.excelbanter.com/excel-worksheet-functions/76619-delete-workbook-while-macro.html)

jthurnwps

Delete a workbook while in a macro
 
I have one macro in a template (A) which opens a different workbook (B) and
populates it then saves it. Because B is so large I created a second macro
in A which copies some of the sheets from B into a third workbook (C) and
saves that under a new name. Now I want to erase B as I don't need it
anymore. How can I set up my second macro in A to do that? (Hope I didn't
confuse anyone.)

Ron de Bruin

Delete a workbook while in a macro
 
Hi jthurnwps

Look at the Kill command in VBA help


--
Regards Ron de Bruin
http://www.rondebruin.nl


"jthurnwps" wrote in message ...
I have one macro in a template (A) which opens a different workbook (B) and
populates it then saves it. Because B is so large I created a second macro
in A which copies some of the sheets from B into a third workbook (C) and
saves that under a new name. Now I want to erase B as I don't need it
anymore. How can I set up my second macro in A to do that? (Hope I didn't
confuse anyone.)





All times are GMT +1. The time now is 05:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com