Excel VBA Worksheets.Add Method to add new worksheet

This tutorial explains how to add new work sheets using Worksheets.Add Method in Excel VBA, or add new worksheets at the back or before specific worksheet You may also want to read: Excel VBA Worksheets.Copy Method to copy worksheet Excel VBA Worksheets.Add Method to add new worksheet Excel VBA Worksheets.Add Method is to add new worksheet in a workbook. Syntax of Excel VBA Worksheets.Add Method Worksheets.Add([Before],[After],[Count],[Type]) Before Optional. Add new worksheet ...
Read More

Excel VBA Workbooks.Add Method to create new workbook

This page explains Excel VBA Workbooks.Add Method, illustrate how to create new workbook in Excel VBA or move data from one workbook to a new workbook What does Excel VBA Workbooks.Add Method do? Excel VBA Workbooks.Add Method is used to create new workbook. Suppose you have a workbook called workbook1, inside workbook1 you need to create new workbook and manipulate it, then you need to insert the Workbooks.Add Method in workbook1. After you have created the workbook, the workbook becomes ac...
Read More

Excel VBA Assign hotkey to Macro using OnKey Method

What is Macro? Macro is a set of actions that are intended to be repeating all over again. Macro is not a word just for Excel, you can find many other software help users record a set of actions for Windows or even for specific games. The first Macro I used was EZ Macro about 15 years ago, which helped me repeat a set of actions in an online game endlessly in order to get my skill points up. Today I still use keyboard and mouse that can record Macro. Excel is very kind to have a built-in Rec...
Read More

Excel VBA Union Method

Excel VBA Union Method for Range Union Method returns a Range which is combined from two or more Range. In the above diagram, Union A and B returns area A plus B, where the intersection area only counts once. The first time I used Union was that I needed to do several formatting for several columnS but they were not side by side. For example, I need to change color for column A, column C and column Z,  the best way to do is to combine all three columns  as a new Range, and then apply c...
Read More

Excel VBA Intersect Method

  Excel VBA Intersect Method for Range In Excel VBA, Intersect Method is used to return the intersection Range (the common area in the above picture). Syntax of Intersect Method expression .Intersect(Range1, Range2, ...) The intersection Range must be at least 2, in order to find the intersection area. If intersection area exists, Intersection Method returns a Range If intersection area does not exist, Intersection Method causes a Runtime Error, which can be avoided using "Is N...
Read More

Excel VBA FollowHyperlink Method

This Excel VBA tutorial explains how to use VBA FollowHyperlink Method to open website. VBA FollowHyperlink Method FollowHyperlink is used to tell Excel to open up a browser and go to a specific website, or download a file in specific folder, depending on your "Hyperlink" address. In Excel spreadsheet, there is a similar worksheet function called Hyperlink, but it converts a text to hyperlink but FollowHyperlink function actually "go to" hyperlink. Syntax of FollowHyperlink Method expre...
Read More