Good day everyone.
All the sheets on my workbook are protected, but every one of them has several cells that have to be unlocked to allow users' inputs. However, if they cut and paste one of the cells, they will mess up the formula and named range references.
To prevent the user to cut and paste any cell, I use the codes:
So will this affect my workbook performance as it runs the sub every time a selection change is made? And it happens on any sheet too because I use the Workbook Sheet Selection Change Event to cover all of the sheets. I feel like it might affect my workbook performance in some way to have an event run for something as simple as selecting another cell?
All the sheets on my workbook are protected, but every one of them has several cells that have to be unlocked to allow users' inputs. However, if they cut and paste one of the cells, they will mess up the formula and named range references.
To prevent the user to cut and paste any cell, I use the codes:
VBA Code:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
If Application.CutCopyMode = xlCut Then
MsgBox "Do not cut the cell. Copy, paste and then delete instead if needed.", vbOKOnly + vbInformation, "Cut Disabled"
Application.CutCopyMode = False
End If
End Sub
So will this affect my workbook performance as it runs the sub every time a selection change is made? And it happens on any sheet too because I use the Workbook Sheet Selection Change Event to cover all of the sheets. I feel like it might affect my workbook performance in some way to have an event run for something as simple as selecting another cell?