Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Deleting Workbook

I've written some code that creates a workbook, emails it
to specific users, then closes it. I'd like to have my
code go in a delete the workbook. Any suggestions?
Thanks - Fred
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Deleting Workbook

Fred,

Just kill it!.... no really...

Try this:

Kill "C:\Documents and Settings\Administrator\Desktop\Book1.xls"

Of course you need to use the right file name. Also note you will have to
manage errors, such as File Not Found or Permission Denied (when the
workbook is open). But Kill will work....

--
Charles
www.officezealot.com


"Fred" wrote in message
...
I've written some code that creates a workbook, emails it
to specific users, then closes it. I'd like to have my
code go in a delete the workbook. Any suggestions?
Thanks - Fred



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Deleting Workbook

That's perfect. Thanks!
-----Original Message-----
Fred,

Just kill it!.... no really...

Try this:

Kill "C:\Documents and

Settings\Administrator\Desktop\Book1.xls"

Of course you need to use the right file name. Also note

you will have to
manage errors, such as File Not Found or Permission

Denied (when the
workbook is open). But Kill will work....

--
Charles
www.officezealot.com


"Fred" wrote in

message
...
I've written some code that creates a workbook, emails

it
to specific users, then closes it. I'd like to have my
code go in a delete the workbook. Any suggestions?
Thanks - Fred



.

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 workbook saqib New Users to Excel 1 June 24th 08 03:22 PM
how to protect workbook from deleting saqib Excel Discussion (Misc queries) 5 June 24th 08 12:47 PM
Deleting Workbook from others Julia Excel Worksheet Functions 2 April 22nd 08 06:34 PM
deleting macros that are not really in my workbook? mydogpeanut Excel Worksheet Functions 1 November 22nd 05 10:42 PM
How do I prevent someone from deleting a workbook? JSP Excel Discussion (Misc queries) 5 September 5th 05 04:51 PM


All times are GMT +1. The time now is 06:16 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"