Example -
In below example, workbook with title abc will be activated using excel macro.
Code / Syntax -
Application.workbooks("abc").activate
After you have activated the workbook, you can use the reference of that workbook as mentioned below
msgbox activeworkbook.name
This is how we can activate the workbook in excel using VBA macro.
In below example, workbook with title abc will be activated using excel macro.
Code / Syntax -
Application.workbooks("abc").activate
After you have activated the workbook, you can use the reference of that workbook as mentioned below
msgbox activeworkbook.name
This is how we can activate the workbook in excel using VBA macro.
No comments:
Post a Comment