Workbook_Open macro question

G

Guest

I'm trying to get a message box to pop up when my workbook is opened. I found
this macro structure in a previous post:

Private Sub Workbook_Open()

MsgBox (" text ")

End Sub

If I click the little "play" button in VB Editor it pops up the box, but if
I close the workbook and re-open it, I don't get the message box. Am I
missing something? Thanks much in advance!
 
R

Ron de Bruin

Hi JaimeZX

You must copy this event in the Thisworkbook module and not in a normal module
 
H

Harald Staff

The code must be in the ThisWorkbook module, nowhere else.

HTH. best wishes Harald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top