Automated Macro Execution

Occasional Contributor

How can I automate macro execution so that a macro is executed when a workbook is opened without the user doing anything else.  I need computer illiterate users to be able to simply click on a link in Word document and be presented with a data entry form.

2 Replies
In the vba editor, double click the "ThisWorkbook" module and create a workbook open event handler.

Private Sub Workbook_Open()
End Sub

As a side note, there are other event options available if you select "Workbook" from the first drop down and then click the second drop down. There are also event options for individual worksheets if you double click on those code modules and browse their dropdown menus.

@JMB17 

Many, many thanks.  Your suggested solution looks like it's exactly what I need.  I just tested it with a simple MsgBox "Hello!", invoking another VBA module to display "Hello yourself", and it worked exactly as I had hoped.  Now to put some meat in the process.