![]() |
Msgbox when a cell with a specific text entry is selected.
On 23 Jul., 16:41, "Rick Rothstein"
wrote: Right click the tab at the bottom of the worksheet you want this functionality on, select View Code from the popup menu that appears, then copy/paste the following into the code window that appeared... Private Sub Worksheet_SelectionChange(ByVal Target As Range) * If Not Target.Find("Report", LookIn:=xlValues, _ * * * * * * * MatchCase:=False) Is Nothing Then * * MsgBox "Deleting the text entry ""REPORT"" results in ...." * End If End Sub Now fix the message in the MsgBox statement to say what you want. That's it... go back to your worksheet and try to select a cell with only the word "Report" in it (in any letter casing) and the MessageBox should appear. -- Rick (MVP - Excel) "andreas" wrote in ... Dear Experts: I would like to have a macro code which will bring up a message box when the cell containing the word "REPORT" is either ... - activated/selected - or about to be deleted (the user selects the entire column/row for deletion or the cell in question *(and possible adjacent cells) to clear them). The msgbox is to say: "Deleting the text entry "REPORT" results in ...." Help is much appreciated. Thank you very much in advance. Regards, Andreas- Zitierten Text ausblenden - - Zitierten Text anzeigen - Hi Rick, exactly what I wanted. Thank you very much for your terrific help. Regards, Andreas |
All times are GMT +1. The time now is 03:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com