- To post as a guest, your comment is unpublished.· 4 months agoHi Kavitha,
Which Excel version are you using?
How to pop up a message box upon activating/opening a specified worksheet in Excel?
You may need a message box pop up to remind you about the details of a worksheet when you activating it in Excel. Please try the below method.
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
The following VBA code can help you to pop up message box when activating a specified worksheet.
1. Press 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 in the Project pane to open the ThisWorkbook (Code) window. And then copy and paste the below VBA code into the code window.
VBA code: Pop up message box upon activating a specified worksheet
Private Sub Workbook_SheetActivate(ByVal Sh As Object) On Error Resume Next If Sh.Name = "Sheet1" Then MsgBox "Please remember to fill in the daily sale", vbInformation, "Kutools for Excel" End If End Sub
Note: In the code, please replace Sheet1 with your specified sheet name. And replace the message box content “Please remember to fill in the daily sale” with the content you need.
3. Press Alt + Q keys simultaneously to close the Microsoft Visual Basic for Applications window.
From now on, when activating or opening this worksheet, a message box will always pop up as below screenshot shown.
- How to create a message box timer to auto close the message box after certain time in Excel?
- How to pop up message box when clicking on a certain cell in Excel?
- How to copy text from message box in Excel?
- How to pop up message box to display range of cells or cell values in Excel?
- How to pop up message box if cell value changes within a range in Excel?
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 5 months agoI am getting compile error. Please help me to rectify the error
- To post as a guest, your comment is unpublished.· 3 years agowhen I copy this I get a compile error: Expected: end of statement.
I don't understand why