VBA-Excel: Add Worksheets For All The Given Dates Except Weekends and Copy The Common Template In Each Worksheet

  Download Link: Multi Sheets Objective: This tool is very useful. Many times we encounter a situation where we need to maintain a report on the daily basis (For weekdays). We manually create a worksheet for each day and copy the template from previous sheets and edit it. This tool will automate all the manual … Read more

VBA-Excel: Create or Add Worksheets at the Run time.

Objective: This article will teach you “how to add worksheets in excel workbook at the run time”. Important Command: Workbook. Worksheets.Add().Name = “NameYourSheet” Complete Code: Sub Sumit() Dim mainWorkBook As Workbook Set mainWorkBook = ActiveWorkbook mainWorkBook.Worksheets.Add().Name = “Sumit” End Sub Output:   Also Read: Create worksheets with Names in Specific Format/Pattern. Add Worksheets For All … Read more

Excel-VBA : Open a Excel File using Another Excel File using Browse Option.

This tutorial will teach you how to Open a Excel File using Another Excel File using Browse Option. We will be using Application.GetOpenFile() function to accomplish this.

NOTE: You can define any type file you want to , just set the proper filter.

FileFilter:=”Excel Files *.xls* (*.xls*) – to open Excel files

FileFilter:=”Excel Files *.txt* (*.txt*) – To open Text File

NOTE :Do not provide any filter if you want to select any type of file as attachment

Complete Code:

Read more

Excel-VBA : Insert Multiple Images from a Folder to Excel Cells

Say you have many images in a folder and you want to insert all these images in your excel work book, one image in one cell. You can do it manually, insert and resize the image and drag it to the particular cell, but think of a scenario where you have more than 100 images or may be more. I am sure you don’t want to do it manually. IF you are looking for solutions for problems like this, this is the tutorial for you.

This tutorial will teach you about how to insert multiple images from a folder into your excel.


  • Open a folder(which contains images) using “Scripting.FileSystemObject”.
  • Get the files in it.
  • Make a loop for all the files
  • Read more

Excel-VBA : Range – Lock/Unlock Specific Cells

There are two different cases you might deal with,

  • Lock only few specific cells and rest of the cells in the work sheet are not locked(means you can edit them)
  • Lock the Enitre worksheet except few cells

Lock only few specific cells and rest of the cells in the work sheet are not locked


  • Lock the selected cells
  • Provide the password

Note: If you wont provide the password then your cells will not be locked.

Read more

WorkBooks and WorkSheets

WorkBook stays at the top of the hierarchy. If we want to retrieve the value from a cell then we have to follow the hierarchy to reach to that particular cell. The Entire Excel file is known as WorkBook and one WorkBook can contain many sheets, or to be more precise, many WorkSheets.
Note: While saving the Excel File , Save it as “Macro Enabled WorkBook” (Select Excel Macro Enabled WorkBook from the Save as type drop down in Save As Dialog box  ( FileName.xlsm))

Excel-VBA-MACRO-Saving in .xlsm
Excel-VBA-MACRO-Saving in .xlsm

Read more