Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to delete a workbook through a macro? Thanks in advance
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A workbook is the same as the file, so you'd first close the
workbook, then Kill the file. E.g., Workbooks("TheBook.xls").Close SaveChanges:=False Kill "TheBook.xls" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "sharman" wrote in message ... Is it possible to delete a workbook through a macro? Thanks in advance |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks a lot for the quick response. Please let me know if there is a way of
a. renaming the files b. saving the files with a different name in a particular folder by using a macro. Thanks again. "Chip Pearson" wrote: A workbook is the same as the file, so you'd first close the workbook, then Kill the file. E.g., Workbooks("TheBook.xls").Close SaveChanges:=False Kill "TheBook.xls" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "sharman" wrote in message ... Is it possible to delete a workbook through a macro? Thanks in advance |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
a. Look up Name in VBA's help
b. Look up SaveAs in VBA's help. sharman wrote: Thanks a lot for the quick response. Please let me know if there is a way of a. renaming the files b. saving the files with a different name in a particular folder by using a macro. Thanks again. "Chip Pearson" wrote: A workbook is the same as the file, so you'd first close the workbook, then Kill the file. E.g., Workbooks("TheBook.xls").Close SaveChanges:=False Kill "TheBook.xls" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "sharman" wrote in message ... Is it possible to delete a workbook through a macro? Thanks in advance -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the reply. I looked up as per your suggestion and it helped. I
want to know if it's possible to activate/close an open workbook by using a part name alongwith with a wild character? Like if the workbook name is "OLD_6_10" and I want to activate it by just using "OLD*". I tried to use but I get an error message. Thanks in advance. "Dave Peterson" wrote: a. Look up Name in VBA's help b. Look up SaveAs in VBA's help. sharman wrote: Thanks a lot for the quick response. Please let me know if there is a way of a. renaming the files b. saving the files with a different name in a particular folder by using a macro. Thanks again. "Chip Pearson" wrote: A workbook is the same as the file, so you'd first close the workbook, then Kill the file. E.g., Workbooks("TheBook.xls").Close SaveChanges:=False Kill "TheBook.xls" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "sharman" wrote in message ... Is it possible to delete a workbook through a macro? Thanks in advance -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to Delete a Range in Closed Workbook (to Replace Delete Query) | Excel Discussion (Misc queries) | |||
how do you delete a workbook | Excel Discussion (Misc queries) | |||
how do I delete a worksheet from my workbook | New Users to Excel | |||
How do I delete a workbook after the vba has run? | Excel Programming | |||
how do I delete a workbook | Excel Programming |