Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default Wen Query Issue

Hi Joel

Thanks for your help. The code is great, but it does not help me to delete
all htm files from Temporary Internet Files. When run the program with the
code you suggested, it cannot find any file to delete. In fact, the files
are under sub directory of Content.IE5 which there are some random sub
folders names to store htm files, If I set path with C:\Documents and
Settings\userid\Local Settings\Temporary Internet Files\Content.IE5\ , we can
only find one file: index.dat, this file is not allowed to delete. How can I
delete those htm files under sub directories?

Thanks for your help

Hans

"Joel" wrote:

Temporary Internet files are stored in the following directory on my PC. You
can find the exact location by going into options on Internt explorer where
you delete temporary internet files and view files. To see these files you
must change you window explorer settings to view possible system files.

C:\Documents and Settings\Joel\Local Settings\Temporary Internet Files

Set fs = CreateObject("Scripting.FileSystemObject")
fs.DeleteFile "c:\temp\abc.txt"


to delete all files in a directory

Folder = "C:\Documents and Settings\Joel\Local Settings\Temporary Internet
Files\"
Set fs = CreateObject("Scripting.FileSystemObject")

FName = Dir(Folder & "*.*")
Do while FName < ""
fs.DeleteFile Folder & FName
FName = Dir(
loop





"Hans" wrote:

Thanks Joel

Yes. it sometimes works, but when I repeat web query more times it dose not
work. After I delete the temporary internet files, it works again, but this
does not sovle my problem, since my web qurey will run many times, in which
the code was wrotteb by VBA in excel. Is there a way to delete temporary
internet files from VBA code when each time I start to run web query?

Hans

"Joel" wrote:

Can you open the file using the same URL in your internet explorer?

"Hans" wrote:

When do Web Query in Excel, got the problem with €śthe file could not be
accessed€ť, What is this problem? How to solve it?



 
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
Microsoft Query/ODBC issue Jombe Excel Discussion (Misc queries) 0 September 7th 07 09:08 PM
Web Query Formatting Issue... Jambruins Excel Discussion (Misc queries) 0 June 28th 07 04:00 PM
Find date query and Display issue VBA Noob Excel Worksheet Functions 2 July 14th 06 11:23 PM
Need help with an 'Edit Query' issue. ken.kimbrell Excel Discussion (Misc queries) 2 May 8th 06 08:48 PM
Query and/or 3D Referencing Issue BonnieRone Excel Discussion (Misc queries) 0 January 6th 06 06:01 PM


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