Macros & Excel VBA

VBA to Call Sub From Another Workbook in Excel (With Examples)

In this article, we will demonstrate how to utilize VBA to call a subroutine (sub) from another workbook, both opened and closed. We will also ...

Excel VBA Range Address – 5 Examples

This is an overview. Download Practice Workbook Download the workbook and practice. Range Address.xlsm Syntax of the Excel ...

How to use the Excel VBA Watch Window

Below, you can see how the watch window monitors the variable value in Excel VBA. How to Add a Watch Window  Open the VBA code editor ...

How to Get Cell Value as String Using Excel VBA (4 Easy Ways)

Here's an overview of the VBA code needed to get cell values. How to Get Cell Value as String with Excel VBA: 4 Approaches Method 1 - Get ...

Excel VBA to Calculate Active Sheet (6 Practical Applications)

Sometimes, when working with large datasets, Excel won't compute all the formulas in the cells. One solution to this problem is to use VBA to ...

VBA Excel to Exit Do While Loop (4 Suitable Examples)

Do While conditional loop in Excel works like almost If conditional Statement, with a bit more flexibility. For example, the if condition inside the ...

How to Resolve the Excel VBA “Argument Not Optional” Error (4 Solutions)

Why “Argument Not Optional” Error Occurs in Excel VBA This error occurs when you call a procedure or function without providing all the required ...

Excel VBA to Check If String Contains Letters: 3 Easy Ways

Method 1 - VBA Code to Check If String Contains Any Letter Every character has a unique ASCII code and the computer recognizes them with that code. ...

How to Use Excel VBA Try Catch – 3 Examples

In the image below, the error is neglected by declaring the On Error Resume Next statement, which replicates the Try Catch statement.   ...

Excel VBA Nested If Then Else in a For Next Loop (3 Examples)

In this article, we explore the practical use of VBA nested If Then...Else statements within a For...Next loop in Excel. The For loop is commonly ...

How to Use Excel VBA Do While Loop with Multiple Conditions

The Do While loop in Excel VBA allows code to be executed repeatedly as long as a specified condition remains true. In this article, we will explore ...

Using Excel VBA to Declare a Global Variable – 2 Methods

This is an overview. Download Practice Workbook Download the practice workbook. Declare Global Variable.xlsm What Are VBA ...

Excel VBA Call Sub from Another Module

  Method 1 - Using Call Function Using the Call Function we can call a sub and execute the task inside the sub directly. There are ...

How to Run a Private Sub in VBA (3 Methods)

Here's an overview of a private sub in VBA. What Does Private Sub Mean in Visual Basic? A private sub refers to a subroutine or method ...

Use Excel VBA to Create Chart from Pivot Table

Here's an overview of using VBA to create a chart from a pivot table. Use Excel VBA to Create Chart from Pivot Table: 3 Methods We have ...

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo