Run A Macro When Worksheet Opens Excel

In the VBA editor, put the following code in the "This Workbook" sheet:


Private Sub Workbook_Open()
MsgBox "I just opened my workbook"
End Sub

then save the workbook, close it, and open it again to see if this is what you want.

Comments

Popular posts from this blog

OCR text detection with google APIs C#

The specified version string contains wildcards, which are not compatible with determinism.

How to set dynamically height/width of an external image in rdlc report?