CurDir

VBA Create Folder with Today’s Date

VBA Create Folder with Today's Date

VBA Create Folder with Today’s or current Date. Today’s date is 3rd Oct 2019. We are checking specified folder is already exists in the specified folder. If it is not available then we are creating new folder using MkDir VBA function. The folder name always displays system current date. We use VBA Now function to …

VBA Create Folder with Today’s Date Read More »

VBA Create Folder on Desktop

VBA Create Folder on Desktop

VBA Create Folder on Desktop. In the below specified example we are using the Environment variable UserProfile to find the desktop location. You can change the folder path which you want to create on the desktop according to your requirement. We are checking specified folder is already exists on the desktop. If it is not …

VBA Create Folder on Desktop Read More »

VBA Remove Directory and its Content

VBA Remove Directory and its Content

VBA Remove specified directory and its content. In the following tutorial we have explained step by step instructions to run example macro. Table of Contents: Objective VBA Removing Directory and its Content Instructions to Run VBA Macro Code Other Useful Resources VBA Remove Directory and its Content Let us see an example macro VBA code …

VBA Remove Directory and its Content Read More »

VBA Count Files in Folder and Subfolders

VBA Count Files in Folder and Subfolders

VBA Count Number of Files in Folder and Subfolders. We are checking main folder and all the other available sub-folders to count number of files. We use recursive method to check each and every sub folder. In the following tutorial we have explain step by step instructions to run example macro. Table of Contents: Objective …

VBA Count Files in Folder and Subfolders Read More »

VBA Delete Empty Subfolders

VBA Delete Blank Subfolders

VBA Delete Empty Subfolders from a specified folder using VBA. First we are checking subfolder has files in it. Files are available we are not deleting that respective subfolder. If files are not available and now subfolder is empty then we are deleting that folder. In the following tutorial we have explained step by step …

VBA Delete Empty Subfolders Read More »

VBA Delete Empty Folder

VBA Delete Empty Folder

VBA Delete Empty Folder in Excel. We use VBA RmDir VBA function to delete only blank or empty folder. It throws an error, If any file exists in the specified folder. The following tutorial explains examples and step by step instructions for user reference. Table of Contents: Objective Example on VBA Blank or Empty Folder …

VBA Delete Empty Folder Read More »

VBA Delete File in Excel

VBA Delete File

VBA Delete File in Excel from a folder or directory. You can delete any file like Excel, Word, PowerPoint, CSV, Notepad etc. Let us see different examples in the following tutorial. We are using Kill statement to delete a file. Table of Contents: Objective Example on Deleting different type of File using Kill Statement Deleting …

VBA Delete File in Excel Read More »

VBA Delete All Files in Folder and Subfolders in Excel

VBA Delete Files in Folder and Subfolder

VBA Delete All Files in Folder and Subfolders in Excel. In the following tutorial we are using recursive method. It is nothing but looping through all folders until finishes all available folders. Let us see an example macro VBA code to delete files in folders and sub folders. You can also find the step by …

VBA Delete All Files in Folder and Subfolders in Excel Read More »

VBA Check If Folder Exists If Not Create It

VBA Check If Folder Exists If Not Create It

VBA Check If Folder Exists If Not Create It in specified name using VBA in Excel. We are using 2 methods to check folder exists or not. Those are Dir VBA function and FileSystemObject object. In the following tutorial let us see an example macro code. And also see the step by step instructions to …

VBA Check If Folder Exists If Not Create It Read More »

VBA Check If File Exists If Not Create It

VBA Check If File Exists If Not Create It

VBA Check If File Exists If Not Create It in Excel. If not create a new file with specified name using VBA in Excel. We are using 2 methods to check folder exists or not. Those are Dir VBA function and FileSystemObject object. In the following tutorial let us see an example macro code. And …

VBA Check If File Exists If Not Create It Read More »

VBA Delete All Files and Subfolders from a Folder

VBA Delete All Files and Subfolders

VBA Delete all Files and Subfolders form a folder using Excel VBA. You can delete all files using DeleteFile method of FileSystemObject. And delete all folders using DeleteFolder method of FileSystemObject. Table of Contents: Overview Delete All Files and Subfolders in a Folder using Excel VBA Example Instructions to Run VBA Macro Code Other Useful …

VBA Delete All Files and Subfolders from a Folder Read More »

VBA Delete All Files in a Folder

VBA Delete All Files in a Folder

VBA Delete All Files in a Folder in Excel Delete all Files in a Folder in Excel using VBA. If folder is empty, then no file is available to delete. In the following tutorial we have explained with example and step by step instructions for user reference. Table of Contents: Objective VBA Delete All Files …

VBA Delete All Files in a Folder Read More »

VBA Check If File Exits then Delete

VBA Check If File Exits then Delete

VBA Check If File Exits then Delete in Excel. If it is available then Delete file from the specified folder. In the following tutorial we have explained step by step instructions. Table of Contents: Objective VBA Checking If File Exits then Delete in Excel Instructions to Run VBA Macro Code Other Useful Resources VBA Check …

VBA Check If File Exits then Delete Read More »

Get Current Working Directory in Excel using VBA

Get Current Working Directory

Get current working directory using VBA in Excel explained with examples. We use CurDir VBA function to find current working directory or folder. It displays system default directory. It can be changed using ChDir function. Table of Contents: Objective Macro to find current working directory using VBA CurDir Function Case study on Get current working …

Get Current Working Directory in Excel using VBA Read More »