I use this .VBS script from Michael Harris:
http://groups.google.com/groups?thre...%40tkmsftngp02
I put the file in a nice location on my harddrive and add a shortcut on my
desktop.
Then I can run it whenever I want.
Essenga_Tom wrote:
>
> Hi Tim,
>
> Can I automate this from within VBA or XL with a macro? Let say every day
> the temp folder will automatically be cleaned up?
>
> "Tim Zych" wrote:
>
> > Good troubleshooting. You're right. Excel stores stuff in a temp
> > directory, and it is a good idea to clean this out periodically for the
> > reason you noticed. I don't think that Excel files are as easily corrupted
> > anymore, but older versions of Excel workbooks can actually become corrupted
> > because of the buildup of this folder, usually when they have controls on
> > the worksheet.
> >
> > The directory is located at Start -> Run %temp%, or in VBA Excel will tell
> > you via Environ("temp")
> >
> > Delete everything in there. If there are locking issues, reboot but don't
> > start Excel and delete everything.
> >
> >
> > "Essenga_Tom" <(E-Mail Removed)> wrote in message
> > news:CE74E7CE-1452-45BF-A01A-(E-Mail Removed)...
> > > Hi,
> > >
> > > I created an app with some checkboxes. The checkboxes are not in a form,
> > > but
> > > are on the worksheet. The app is running 24/7. From time to time the app
> > > is
> > > closed and opened again. In these events it took about 20 - 30 minutes to
> > > close or open the app. After doing some investigation, problem turned out
> > > to
> > > be the temp folder. I found about 20.000 emf files. These emf files
> > > appeared
> > > to be multiple copies of the checkboxes used in my app.
> > > Has anyone an idea what's happening here? How can I avoid this? If not
> > > avoided, can I, from within XL, delete these emf files in the temp folder?
> > >
> > > Thx in advance
> > > Tom
> >
> >
> >
> >
> >
--
Dave Peterson