how to create pop up message very time workbook is opened

Occasional Contributor

Hi, i am wanting to create a pop up message every time my work book is opened, to tell every one to read the "instructions" sheet before editing. 

is there a way to do this?

thanks kelly

1 Reply

Hi @Tullyk 


You could addin a simple message box that appears when you open the workbook.


1. Add the Developer tab to your tab menu (right click onto a tab > Customize the Ribbon and tick Developer).


2. Go to Developer tab and click onto Visual Basic.


3. In the left side list under VBAProject (Book1), double click ThisWorkbook.


4. Drop down the list box where it says (General) and choose Workbook.


5. Type in msgbox("your message").




6. Save As a Excel Macro-Enbaled Workbook (*.xlsm)


When you open the file, you will see a yellow warning pop up the top to enable macro content. Clicking Enable will then all the code to run.


7. If you want the message to appear without this prompt, you could turn it off in File > Options > Trust Center > Macro Settings > Enable all macros...


Just note there are some security risks doing this as malicious code could be executed if you happen to open a dodgy file.


Anyway hope that helps?




Related Conversations