Pls how to prevent inserting rows and columns in excel. This code not working:
Sub DisableInsertRowColumn() Dim ws As Worksheet Set ws = ThisWorkbook.Worksheets("Sheet1") ws.Protect Password:="YourPassword", AllowInsertingRows:=False, AllowInsertingColumns:=FalseEnd Sub
Sub DisableInsertRowColumn() Dim ws As Worksheet Set ws = ThisWorkbook.Worksheets("Sheet1") ws.Protect Password:="YourPassword", AllowInsertingRows:=False, AllowInsertingColumns:=FalseEnd Sub