Excel Macros in VBA are really a great way to do repetitive or an automated task. So if you have a specific macro that you'd like to be run every time a specific file is opened, then you need to write the VBA code for that macro in the Workbook_Open() procedure.
Follow the following steps to do that:
Open the Visual Basic editor from the Developer Tab. (Go to the following link if you can't see the Developer Tab)
Follow the following steps to do that:
Open the Visual Basic editor from the Developer Tab. (Go to the following link if you can't see the Developer Tab)
- Look for "This workbook" in the Project Explorer and double-click it.
- Select Workbook from the 1st drop-down
- Select Open from the 2nd drop-down for excel to automatically create a procedure for Workbook_Open().
- Insert the VBA code that you want to run every time the specific excel file is opened.
Microsoft Visual Basic for Applications
There are many other similar procedures that you can add in "This Workbook" like BeforeClose, BeforeSave, Sheet Change etc..,
|
Comments
Post a Comment