In this article we are going to show you how you can delete file or files using a single line of VBA code.
Kill "E:\Work\ExcelSirJi\ Test 3.txt"
Kill "E:\Work\ExcelSirJi\*.txt"
Kill "E:\Work\ExcelSirJi\*"
The code will delete file(s) from the given folder
Thanks for reading the article, subscribe us to get more VBA tricks
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
VBA Code to list Files in Folder To work on multiple files through VBA programming, you need to have VBA code that can list files in a folder. In this article we will learn three…
VBA to Read Excel Data Using Connection String Sometimes as a programmer you need to read heavy (more then 5 MB) Excel files. There are two ways you can read data from Excel files: Open…
Outlook Email Management Tool is an Excel based tool which works with Outlook 2010 or above version and helps you to read, copy or move multiple emails from an Outlook folder and sub-folders on click of a button. The tool also supports extracting attachments from emails as well.
Table of Content VBA Code to Get User Domain Name VBA Code to Get User Domain Name – Method 1 VBA Code to Get User Domain Name – Method 2 Steps to use this VBA…
Merge Excel Files From last few months, we have been receiving frequent requests from users for a VBA tool which can consolidate Excel files from a folder. So here we come with one more free…
Duplicate Files Finder Tool is an MS Excel based tool to identify duplicate files exist in your system or shared folder. The tool takes a base folder path as input and list down all duplicate files in the folder and sub-folders. It has capability to find duplicate files by comparing the names and their size.
Could you kindly please send the VBA code how to deleteor files using a single line of VBA code my email address [email protected]
Just want to check, are you not able to copy the codes from the article. You can use these same codes for your requirements. Let us know if you have any other challenges.