How to create pop up message box when opening an Excel file?
In certain case, you may want a message box always popup to remind you what you need to do first when you open a specific workbook, this can help you remember to do the most important thing in your daily work. And this article, I will talk about how to create a pop up message box when opening an Excel file.
Create a pop up message box when opening Excel file with VBA code
Automatically open some specific workbooks when launch Excel next time
Create a pop up message box when opening Excel file with VBA code
You can create a VBA code to make a message box popped out when you open the specific workbook, please do as follows:
1. Hold Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.
2. In the Microsoft Visual Basic for Applications window, double click ThisWorkbook from the Project-VBAProject pane, then copy and paste the below VBA code into the Module window, see screenshot:
Note: If the Project-VBAProject pane is hidden, click View > Project Explorer to display it.
VBA code: Create a pop up message box when opening Excel file:
Private Sub Workbook_Open()
MsgBox "Send this file to xxx"
End Sub
3. Then close the code window, and save this workbook as Excel Macro-Enabled Workbook format, please click File > Save As, and in the Save As window, select Excel Macro-Enabled Workbook from Save as type list, see screenshot:
4. Now, a security warning message is displayed at the top of the sheet table first time when you open this file, please click Enable Content button to activate the VBA code, see screenshot:
5. After activating the VBA code, a message box is popped out at once. See screenshot:
Notes:
1. You can change the text message in the code to any other word you need;
2. The security warning message will not displayed after the first opening. So when you launch this file next time, the message box will be popped out directly.
Automatically open some specific workbooks when launch Excel next time
It is easy and time-saving for you to open multiple workbooks that you always use when launching any Excel file, Kutools for Excel’s Auto Open Those Workbooks Next Time feature can help you deal with this job quickly and comfortably.
Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. |
After installing Kutools for Excel, please do with following steps:
1. Open the workbooks that you want to open together next time automatically.
2. Then click Enterprise > Workbook > Auto Open Those Workbook Next Time, see screenshot:
3. In the Auto Open Those Workbook Next Time dialog box, please click Select all to check all the workbooks that you want to auto open next time when you launching an Excel file, then click Ok to exit the dialog, see screenshot:
4. And now, when you launch an Excel file, all the workbooks you selected are opening at the same time.
Note: To cancel this operation, you just need to unselect all the workbooks or remove or clear the workbooks in the Auto Open Those Workbook Next Time dialog box.
Free Download Kutools for Excel Now!
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
