Skip to main content

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


arrow blue right bubble 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

doc message box opening 1

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:

doc message box opening 2

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:

doc message box opening 3

5. After activating the VBA code, a message box is popped out at once. See screenshot:

doc message box opening 4

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.


arrow blue right bubble 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:

doc message box opening 5

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:

doc message box opening 6

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

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

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...

Description


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!
Comments (2)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi,
I used this to display a pop-up message that informs the user that "This is a Master File, please create a copy and do not amend/move this file."
Can I alter the VBA code in such a way that once this Master File has been copied, the VBA will no longer display in that copy?
Thank you
This comment was minimized by the moderator on the site
Need pop-up msg for when cell value reaches 5%up and automatically notification comes..What formula will written on VBA ????
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations