I want to allow the user to input only certain cells in Excel and other cells will be locked. (example: .Cells[1,1])
I wrote the code as below, the problem is I want to show a specific message
when user input locked cell. (example: "You Can't Modify Item Cost")
What should I do?
I wrote the code as below, the problem is I want to show a specific message
when user input locked cell. (example: "You Can't Modify Item Cost")
What should I do?
cell lock:
Excel.Worksheet ws_active = Globals.ThisAddIn.GetActiveSheet();
ws_active.Cells.Locked = false;
#region select cell for lock
ws_active.Cells[1, 1].Locked = true;
Globals.ThisAddIn.Application.DisplayAlerts = false;
#endregion select cell for lock
ws_active.Protect();