Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old December 9th 19, 12:34 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jun 2015
Posts: 6
Default Simple Macro to Delete an Excel file at a specific Folder Location

Hello - Could someone possibly let me know what VBA code to use that will simply delete an Excel File at a particular location (on my desktop)?

Not sure if it matters, but I am using Office/Excel 2010

And if it helps, the exact folder location is below.

C:\Users\James\SkyDrive\SkyPLT\MainSellerAccount\I mports\DailyImportTemplate\NONSPECPRICING


This is probably not relevant, but as an FYI, I will be running this new code PRIOR to running another VBA Macro (that I run daily) that requires that the file that is being deleted is not there, in order to begin. This is because that other VBA Macro seems to be turning off the Macros in that folder, and thus disallowing the Microsoft Access export to export the updated file to that location.

  #2   Report Post  
Old December 9th 19, 10:37 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,138
Default Simple Macro to Delete an Excel file at a specific Folder Location

Hello - Could someone possibly let me know what VBA code to use that will
simply delete an Excel File at a particular location (on my desktop)?

Not sure if it matters, but I am using Office/Excel 2010

And if it helps, the exact folder location is below.

C:\Users\James\SkyDrive\SkyPLT\MainSellerAccount\I mports\DailyImportTemplate\NONSPECPRICING


This is probably not relevant, but as an FYI, I will be running this new code
PRIOR to running another VBA Macro (that I run daily) that requires that the
file that is being deleted is not there, in order to begin. This is because
that other VBA Macro seems to be turning off the Macros in that folder, and
thus disallowing the Microsoft Access export to export the updated file to
that location.


Have a look at the VBA Kill() function!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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
Macro to Save File to specific location when closing paankadu Excel Discussion (Misc queries) 3 October 27th 09 12:52 AM
How to find all folder and/or files in a specific location Mr. GetRight[_2_] Excel Programming 1 July 3rd 08 11:08 AM
How to find all folder and/or files in a specific location Mr. GetRight Excel Discussion (Misc queries) 0 July 2nd 08 06:51 PM
can excel automaticaly open file from specific folder sand Excel Discussion (Misc queries) 1 July 7th 07 03:56 PM
FYI: One macro really helped for capturing data from multiple workbook stored in a specific folder to one excel file only Smits Excel Programming 0 November 8th 06 05:37 AM


All times are GMT +1. The time now is 10:39 PM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017