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

I'm Looking for a macro that will delete all workbooks in folder
c:\temp that have not been modified for 7 day or more.


Thanks



Little Penny
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 257
Default Delete Workbooks

You'll probably have to write one, Little Penny. Do you absolutely want to
be in Excel when you do it? because it seems to me that if you're not already
in Excel when you want to run this task, it'd be more convenient to write it
in VBScript; that allows you simply to double-click on an icon out in
Windows, instead of having to open a workbook in Excel first.

If, as seems likely, you're not sure how to go about writing (either in
VBA/Excel or in VBScript) code that will do that, some folks here won't mind
taking you on as a beginner and getting you up to speed. But are you willing
to learn how? If you're hoping just to have someone write it for you,
someone probably will, but how then will you know how to run it, and how to
modify it later when you need to do something different with it?

--- "Little Penny" wrote:
I'm Looking for a macro that will delete all workbooks in folder
c:\temp that have not been modified for 7 day or more.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Delete Workbooks


Thanks for the feedback. I forgot to post the code I was using. Also
I'm always willing to learn.


Have a great day...











On Wed, 17 Sep 2008 22:11:00 -0700, Bob Bridges
wrote:

You'll probably have to write one, Little Penny. Do you absolutely want to
be in Excel when you do it? because it seems to me that if you're not already
in Excel when you want to run this task, it'd be more convenient to write it
in VBScript; that allows you simply to double-click on an icon out in
Windows, instead of having to open a workbook in Excel first.

If, as seems likely, you're not sure how to go about writing (either in
VBA/Excel or in VBScript) code that will do that, some folks here won't mind
taking you on as a beginner and getting you up to speed. But are you willing
to learn how? If you're hoping just to have someone write it for you,
someone probably will, but how then will you know how to run it, and how to
modify it later when you need to do something different with it?

--- "Little Penny" wrote:
I'm Looking for a macro that will delete all workbooks in folder
c:\temp that have not been modified for 7 day or more.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 257
Default Delete Workbooks

I'm not sure where you choose to go from here, Little Penny. If you want to
write it in VBS, you can either contact me off-line (my email address is in
my profile) or go to the VBS forum to ask the same question - that's
microsoft.public.scripting.vbscript. If you want to correct code you already
have, you'll have to post it, of course. If you want to write it from
scratch in VBA/Excel, you can continue the questions here or, if you have no
idea how to begin, contact me by email as above and I'll sort of coach you
through it.

--- "Little Penny" wrote:
Thanks for the feedback. I forgot to post the code I was using. Also
I'm always willing to learn.


--- On Wed, 17 Sep 2008 22:11:00 -0700, Bob Bridges wrote:
You'll probably have to write one, Little Penny. Do you absolutely want to
be in Excel when you do it? because it seems to me that if you're not already
in Excel when you want to run this task, it'd be more convenient to write it
in VBScript; that allows you simply to double-click on an icon out in
Windows, instead of having to open a workbook in Excel first.

If, as seems likely, you're not sure how to go about writing (either in
VBA/Excel or in VBScript) code that will do that, some folks here won't mind
taking you on as a beginner and getting you up to speed. But are you willing
to learn how? If you're hoping just to have someone write it for you,
someone probably will, but how then will you know how to run it, and how to
modify it later when you need to do something different with it?

--- "Little Penny" wrote:
I'm Looking for a macro that will delete all workbooks in folder
c:\temp that have not been modified for 7 day or more.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Delete Workbooks

You can start here
http://www.rondebruin.nl/folder.htm

You can use the code in this macro in combination with the Kill command
Sub Copy_Files_Dates()

See also the examples for Kill on the same page


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Little Penny" wrote in message ...
I'm Looking for a macro that will delete all workbooks in folder
c:\temp that have not been modified for 7 day or more.


Thanks



Little Penny

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
Delete in different worksheets and workbooks Faboboren Excel Programming 9 November 17th 07 08:15 PM
I have 2 identical workbooks within 1 file, how do I delete 1? rexie3 Excel Worksheet Functions 3 March 14th 07 02:53 PM
How to delete duplicates between workbooks? Jay Excel Worksheet Functions 1 January 23rd 07 03:06 PM
How to delete duplicates between workbooks? Jay Excel Worksheet Functions 0 January 23rd 07 02:58 PM
Simultaneous rst.AddNew and rst.Delete from 2 Workbooks Trip[_3_] Excel Programming 0 December 27th 06 08:50 PM


All times are GMT +1. The time now is 08:59 AM.

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

About Us

"It's about Microsoft Excel"