aayaanmayank
Board Regular
- Joined
- Jul 20, 2018
- Messages
- 157
Hi Can any one help me on this. i need a code which can stop the user to delete or Insert the column from all the ways including Ribbon.
I am using below code but its not working on EXCEL RIBBON.
I am using below code but its not working on EXCEL RIBBON.
VBA Code:
Sub disControls()
Application.CommandBars("Ply").FindControl(ID:=847).Enabled = False
On Error Resume Next
With Application
With .CommandBars("Worksheet Menu Bar")
.Controls("Insert").Controls("Columns").Enabled = False
End With
With .CommandBars("Ply")
.Controls("Delete").Enabled = False
.Controls("Rename").Enabled = False
End With
With .CommandBars("Standard")
.Controls("Columns").Enabled = False
End With
End With
End Sub