Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use VBA "Kill" W Flash Drive 1

Status
Not open for further replies.

WaterSprite

Technical User
Mar 23, 2004
69
US
ChDir "C:\DEQ"
Kill ("Chem1.xls")
This code works.

ChDir "G:\BackUp"
Kill ("NightlyReport")
This will not work. "G" being a 4mb USB Flash drive.
What am I doing wrong. I know not to try and kill an open workbook. I got around the problem by using Appliction.displayalerts = false, but why can't I kill a workbook from a flash drive.
 
Have a look at the ChDrive instruction.
ChDrive "G"
ChDir "G:\BackUp"
Kill ("NightlyReport")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top