Computing.Net > Forums > Office Software > Visual Basic Delete a File

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Visual Basic Delete a File

Reply to Message Icon

Name: stevezal
Date: March 19, 2005 at 07:16:30 Pacific
OS: Win 2K
CPU/Ram: P3/500MB
Comment:

This is driving me crazy! I can't seem to find a command in Access 2K Visual Basic that deletes a file. I would have thought it would be a method of the DoCmd object but I sure can't find it. I'd appreciate the VB command that would do this. Thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: mdow
Date: March 24, 2005 at 08:14:09 Pacific
Reply:

strFile = "path\filename"

Set fs = CreateObject("Scripting.FileSystemObject")

fs.deletefile strFile


0

Response Number 2
Name: stevezal
Date: March 25, 2005 at 07:14:02 Pacific
Reply:

Thanks for your help, mdow, I never would have guessed that sequence.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Visual Basic Delete a File

word - visual basic runtime error 5 www.computing.net/answers/office/word-visual-basic-runtime-error-5/3683.html

Learn Visual Basic for Access 2000 www.computing.net/answers/office/learn-visual-basic-for-access-2000/3267.html

Visual Basic 6 Enterprise Edition www.computing.net/answers/office/visual-basic-6-enterprise-edition/5121.html