Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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,


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
NgS NgS is offline
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting code from a macro (by a macro) Brettjg Excel Discussion (Misc queries) 2 May 8th 07 10:14 PM
MACRO for Deleting every 2nd ROW Tufail Excel Programming 1 June 18th 06 04:04 PM
Deleting A Macro Using VB.NET Elena Excel Programming 2 June 5th 06 08:29 PM
VBA deleting Macro Pete Excel Programming 1 September 21st 04 08:07 PM
Deleting macro Stephane[_3_] Excel Programming 3 May 4th 04 06:12 PM


All times are GMT +1. The time now is 04:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"