View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff[_2_] Harald Staff[_2_] is offline
external usenet poster
 
Posts: 449
Default 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,