Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro - Deleting.
I am able to modify macro, but I cannot create one from scratch. With that
being said, I would like to create a macro that would delete a workbook. If this is possible can someone give me the codes that need to be used. Thanks, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro - Deleting.
Hi
It's not that hard. You type "sub " and a unique name in a module and hit Enter -and there's the macro. Problem is to make it do reasonable things. To delete a workbook saved on file, type something like Sub Kill() Kill "C:\Temp\Book1.xls" End Sub assuming that you want to delete Book1.xls stored in C:\Temp and that it is not in use at the time. HTH. Best wishes Harald "Dolores" wrote in message ... I am able to modify macro, but I cannot create one from scratch. With that being said, I would like to create a macro that would delete a workbook. If this is possible can someone give me the codes that need to be used. Thanks, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro - Deleting.
Thanks Harald. This was very helpful
"Harald Staff" wrote: Hi It's not that hard. You type "sub " and a unique name in a module and hit Enter -and there's the macro. Problem is to make it do reasonable things. To delete a workbook saved on file, type something like Sub Kill() Kill "C:\Temp\Book1.xls" End Sub assuming that you want to delete Book1.xls stored in C:\Temp and that it is not in use at the time. HTH. Best wishes Harald "Dolores" wrote in message ... I am able to modify macro, but I cannot create one from scratch. With that being said, I would like to create a macro that would delete a workbook. If this is possible can someone give me the codes that need to be used. Thanks, |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro - Deleting.
Hi Harald,
My excel is 2007 and VB is 6.5. i tried, but encounter "can't execute code in break mode" error. Cheers "Dolores" wrote: Thanks Harald. This was very helpful "Harald Staff" wrote: Hi It's not that hard. You type "sub " and a unique name in a module and hit Enter -and there's the macro. Problem is to make it do reasonable things. To delete a workbook saved on file, type something like Sub Kill() Kill "C:\Temp\Book1.xls" End Sub assuming that you want to delete Book1.xls stored in C:\Temp and that it is not in use at the time. HTH. Best wishes Harald "Dolores" wrote in message ... I am able to modify macro, but I cannot create one from scratch. With that being said, I would like to create a macro that would delete a workbook. If this is possible can someone give me the codes that need to be used. Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting code from a macro (by a macro) | Excel Discussion (Misc queries) | |||
MACRO for Deleting every 2nd ROW | Excel Programming | |||
Deleting A Macro Using VB.NET | Excel Programming | |||
VBA deleting Macro | Excel Programming | |||
Deleting macro | Excel Programming |