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.
Want to learn how to unprotect Excel worksheet? Follow this simple guide to master this important skill in Excel. You can protect an Excel worksheet with or without a password. This helps keep your data…
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…
Introduction :- ColorIndex in Excel VBA Today let’s try to understand how ColorIndex property in Excel VBA works. It is an easy and effective way to quickly complete the development. ColorIndex property is normally used…
How to Find Duplicate Files In excel using VBA? Yesterday I was working on my computer and cleaning the drives to make some more space. I was surprised to see so many files saved at…
VBA Code to Read Outlook Emails Reading emails from Outlook and capture them in Excel file is very common activity being performed in office environment. Doing this activity manually every time is quite boring and…
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.