auto open userform

0

Hello

how can i make the macro auto run when the excel file opens ?

Answer
Discuss

Discussion

Please don't forget to select the answer that worked for you! Just click the Select Answer button at the bottom of the desired answer.
don (rep: 1655) Apr 19, '19 at 2:36 am
Add to Discussion

Answers

2

In VBA go to 'ThisWorkbook' - double click on it. There are 2 drop down boxes.  The one on the left is Object; the one on the right is Procedure.  Click on the Object box (there's a triangle pointing downwards) and select Workbook.  In the Procedure drop down box select Open. there will be code like:

Private Sub Workbook_Open()

End Sub

call your macro inbetween the top line (Private Sub Workbook_Open) and the End Sub.  Save your file as a macro file, close and then reopen.

Discuss

Answer the Question

You must create an account to use the forum. Create an Account or Login