Prevent Column adjustments?
protecting the worksheet is one way
"CLR" wrote:
Hi All.............
I have these two nifty pieces of code given to me by kind folks in this
group. They work beautifully to prevent the User from accessing the "Format
Painter" feature. Could someone please tell me how they could be modified
to instead, prevent the Width-adjustment of Columns by casual users, and
furthermore, how to prevent the Hiding of Columns?
Private Sub Workbook_Activate()
Dim ctl As CommandBarControl
For Each ctl In Application.CommandBars("Standard").Controls
If ctl.Caption = "&Format Painter" Then
ctl.Enabled = False
End If
Next
End Sub
Private Sub Workbook_Deactivate()
Dim ctl As CommandBarControl
For Each ctl In Application.CommandBars("Standard").Controls
If ctl.Caption = "&Format Painter" Then
ctl.Enabled = True
End If
Next
End Sub
TIA
Vaya con Dios,
Chuck, CABGx3
|