VBA to create new Excel Workbook

You can easily add any type of workbook, whether it’s a .xlsm, xlsx, xlst etc., using the Method workbooks.add Using this vba method, one can achieve as follows: You can add a workbook.add method to a variable: Dim wb as workbook set wb=workbooks.add can process creating a new workbook and manipulate the created workbook as desired.Continue reading “VBA to create new Excel Workbook”

VBA Select command for Excel Elements

In Excel we deal with cells, rows, columns, worksheet, ranges, etc. Today, let us find how to identify these elements using vba. To use cells in vba we have to define as cell(1,1), which means the cell where the  first row and first column is intersected. The same we can define in vba in aContinue reading “VBA Select command for Excel Elements”

Offset in VBA

What is Offset? The Offset property in Excel VBA takes the range which is a particular number of rows and columns away from a certain range (border below for illustration only). Place a command button on your worksheet and add the following code lines: Dim example As Range. What is the OFFSET Function? The OFFSET function is categorized under Lookup and ReferenceContinue reading “Offset in VBA”