FSO

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 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 »

Create Microsoft Scripting Runtime Reference

Microsoft Scripting Runtime Reference

Create Microsoft Scripting Runtime Library Reference. Here are the instructions to add reference before running below VBA macro code. Table of Contents: Objective Step by step instructions to add Microsoft Scripting Runtime Library reference Create FSO Object VBA FSO Auto List Members Enable VBA FSO Auto List Members Instructions to Run VBA Macro Code Other …

Create Microsoft Scripting Runtime Reference Read More »

VBA Loop Through all Files in subfolders

VBA Loop Through all Files in subfolders

VBA Loop Through all Files in subfolders using File System Object(FSO) and built-in Dir() function. VBA for each file in sub-folder macro helps us to loop through all files in sub-folders. In this tutorial we loop through sub-folders and list all available files in sub-folders using FSO early-binding and late-binding method and Dir() function. There …

VBA Loop Through all Files in subfolders Read More »