Title says it all:
How would one initiate an alert if a user attempts to delete a row containing a Global Named Range? I would assume this would be a Worksheet_BeforeRightClick event?
Thanks,
Title says it all:
How would one initiate an alert if a user attempts to delete a row containing a Global Named Range? I would assume this would be a Worksheet_BeforeRightClick event?
Thanks,
Perhaps it was the Noid who should have avoided me...
If you are satisfied with my solution click the small star icon on the left. Thanks
1. Make a copy of your workbook and run the following code on your copy (just in case)
2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
3. Paste the code from above into the empty white space. Close the VBE.
4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".
24-hr bump
Try:
In this example named range is called "myRange". This won't prevent them from deleting the rows, just alerts them if they do. Would be best just to lock the rows you don't want deleted.![]()
Please Login or Register to view this content.
How does the attached workbook work for you? (It's not fool-proof because it checks every named range in the workbook for errors instead of the row required but it should give you a head start).
P.S. It would be much easier just to protect the required row and worksheet.
*******************************************************
HELP WANTED! (Links to Forum threads)
Trying to create reusable code for Custom Events at Workbook (not Application) level
*******************************************************
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks