Hello,
I want to protect columns B to AA from deleting and i can edit of them but there are more columns after AA.
How can i do that?
Best Regards
Hello,
I want to protect columns B to AA from deleting and i can edit of them but there are more columns after AA.
How can i do that?
Best Regards
Lock at least one cell in each of the columns. Protect the sheet but allow column deletion.
This code will lock the cells in the range. You wont be able to select, delete or edit them.
Sub Macro1() 'SET ERROR HANDELING On Error Resume Next 'SETTING ALL CELLS TO UNLOCKED BECAUSE THE DEFAULT IS LOCKED Cells.Select Selection.Locked = False 'FORMATTING THE DESIRED RANGED TO LOCKED Range( _ "B:B,C:C,D:D,E:E,F:F,G:G,H:H,I:I,J:J,K:K,L:L,M:M,N:N,O:O,P:P,Q:Q,R:R,S:S,T:T,U:U,V:V,W:W,X:X,Y:Y,Z:Z,AA:AA" _ ).Locked = True 'SETTING THE WORKSHEETS PROTECTION ActiveSheet.Protect End Sub
- I HAVE NO IDEA WHAT I'M DOING