LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default Prevent Column adjustments?

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




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot adjustments walrus Excel Discussion (Misc queries) 1 January 18th 10 01:16 PM
Row Height Adjustments Janet Lyn[_2_] Excel Discussion (Misc queries) 3 March 25th 09 02:04 PM
time adjustments Michael Vestel Excel Discussion (Misc queries) 2 November 17th 06 08:46 AM
Adjustments Andy New Users to Excel 4 January 21st 05 02:55 PM
Help! need some adjustments! Simon Lloyd[_402_] Excel Programming 2 April 27th 04 10:03 PM


All times are GMT +1. The time now is 04:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"