If you want to add any description for any cell you select in Excel, pop-up message box is undoubtedly a good choice. With VBA code, you could easily create or delete pop-up message box to excel cell.
Add or Remove Pop-up Message Box to Excel Cell Using VBA Code
Step 1: Open worksheet with cells that you need to display message box when you click it.
Step 2: Right click the sheet tab and select View Code from the context menu.
Step 3: Confirm sheet you choose in appearing Microsoft Visual Basic for Applications window.
Step 4: Copy and paste following VBA code in the right blank code window.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range(“A1:C10”)) Is Nothing Then _
MsgBox “Please input a number”, vbInformation, “Kutools for Excel”
End Sub
Notes:
- In the code, “A1:C10” means that message box will pop up when click on any cell of this range.
- “Please input a number or name” is displayed content of the message box.
If you want to change the content in pop-up message box, please enter that you want to display.
Step 3: Press Alt + Q to close the Microsoft Visual Basic for Applications window.
From now on, when clicking on any cell of range A1:C10, you will get a message box as below screenshot shown.
And if you want to remove the message box, just need to select the sheet tab to view its VBA code, and delete the code. Then there would be no pop-up message box to excel cell.
Related Articles:
- How to Add/Show/Hide Comments to Cell in Excel 2010
- How to Remove or Change Comment Author Name in Excel 2016/2013/2010
- How to Disable Excel Forgotten Password to Open and Edit Excel File
- How to Remove Restrict Editing in Excel 2007-2016 without Password
I like the way you make it simple. Very helpful!
Note: If you have installed third party applications to block pop-ups (examples include the Google, MSN, and Yahoo! toolbars), be sure to consult the vendor documentation to allow pop …