
This helps you to accessing workbook or sheet without selecting or activating it. It is good practice to set the required workbook or sheet to an object. We can also select required workbook when we have more than one Excel Workbook is opened. When we have multiple worksheets in a workbook, we can select required sheet using VBA. VBA to Select Workbook or Worksheet in Excel
#Excel worksheets sheet1 activate verizon code#
Copy the above code and Paste in the code window.Workbooks("Book2.xls").Sheets("Sheet1").Activate Using following code you can Choose the required Workbook and Sheet, and Activate Workbook Or Work Sheet using Excel VBA.

For example workbook name is “Book2” which we want to activate, it contains sheet named as “Sheet1”. Worksheets('Sheet1').Activate Worksheet. Remarks Calling this method is equivalent to choosing the sheet's tab. Syntax expression.Activate expression A variable that represents a Worksheet object. If you know the name of the workbook, you can use the following VBA code to Activate Workbook or worksheet. Makes the current sheet the active sheet. Return value Variant Example This example selects cells A1:C3 on Sheet1 and then makes cell B2 the active cell. Activate expression A variable that represents a Range object. To select a range of cells, use the Select method. You may want to Activate Workbook Or Work Sheet using object Activates a single cell, which must be inside the current selection.


Sometimes we may want to Activate Workbook Or Worksheet using Excel VBA.You can use Activate method in VBA to Select the required Workbook Or WorkSheet using VBA and perform required tasks.įor example, we may have 5 worksheets, we have to do some tasks in Sheet3.
