![]() |
Deactivating Insert/Delete Row/Column
I have a specialized worksheet that will require that I create a new
menu function that tightly controls how rows are added and deleted and does not allow for insertion or deletion of columns on a worksheet. I think I know how to create the custom menu, but how do I deactivate the insert or deletion of rows/columns using the standard method. |
Deactivating Insert/Delete Row/Column
In the workbook_open event eliminate the or gray out the option to do what
you want. Here's some code that disables the delete option from the menu: 'Stop user from being able to delete Application.CommandBars("Column").Controls("&Delet e").Enabled = False Application.CommandBars("Row").Controls("&Delete") .Enabled = False Application.CommandBars("Column").Controls("&Delet e...").Enabled = False Application.CommandBars("Row").Controls("&Delete.. .").Enabled = False Application.CommandBars("Edit").Controls("Delete.. .").Enabled = False Application.CommandBars("Cell").Controls("Delete.. .").Enabled = False Don't forget to re-enable these options on the workbook close or the next time the user uses excel he won't have these options. " wrote in message oups.com... I have a specialized worksheet that will require that I create a new menu function that tightly controls how rows are added and deleted and does not allow for insertion or deletion of columns on a worksheet. I think I know how to create the custom menu, but how do I deactivate the insert or deletion of rows/columns using the standard method. |
All times are GMT +1. The time now is 03:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com