Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default how to disable insert column

How do I disable to insert and delete column in a sheet WITHOUT
protecting the sheet?

For example, if I right click on a excel sheet, I see "Insert" &
"Delete" menu items, which I would like to grey out or disable it. And
I want to achieve this without protecting the sheet.

Any help is appreciated.

Thanks in advance..

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default how to disable insert column

See
http://www.rondebruin.com/menuid.htm

Do not forget the shortcuts


--
Regards Ron de Bruin
http://www.rondebruin.nl


"ndalal" wrote in message oups.com...
How do I disable to insert and delete column in a sheet WITHOUT
protecting the sheet?

For example, if I right click on a excel sheet, I see "Insert" &
"Delete" menu items, which I would like to grey out or disable it. And
I want to achieve this without protecting the sheet.

Any help is appreciated.

Thanks in advance..



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default how to disable insert column

Thanks Ron, however I have a couple of problems..

I'm trying to use the following code to disable every "Copy" control in
the Menu Bar, Toolbars and right click menus

Sub MenuControl_False()
' Excel 2000 - 2003
Dim Ctrl As Office.CommandBarControl
For Each Ctrl In Application.CommandBars.FindControls(ID:=19)
Ctrl.Enabled = False
Next Ctrl
End Sub

However I need to disable this only for a particular sheet, not all the
sheets. How can I achieve this?

Also for insert column, I'm only able to disable from menu bar, not
from the right click menus. Any clue?

Please bear with me as I'm new to excel programming.

Thanks....

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default how to disable insert column

Hi ndalal

However I need to disable this only for a particular sheet, not all the
sheets. How can I achieve this?


See the tips (number 3)
http://www.rondebruin.com/menuid.htm#Information

Also for insert column, I'm only able to disable from menu bar, not
from the right click menus. Any clue?


The Id is for insert in the Cell menu is
3181

Application.CommandBars("Cell").FindControl(ID:=31 81).Enabled = False




--
Regards Ron de Bruin
http://www.rondebruin.nl


"ndalal" wrote in message ups.com...
Thanks Ron, however I have a couple of problems..

I'm trying to use the following code to disable every "Copy" control in
the Menu Bar, Toolbars and right click menus

Sub MenuControl_False()
' Excel 2000 - 2003
Dim Ctrl As Office.CommandBarControl
For Each Ctrl In Application.CommandBars.FindControls(ID:=19)
Ctrl.Enabled = False
Next Ctrl
End Sub

However I need to disable this only for a particular sheet, not all the
sheets. How can I achieve this?

Also for insert column, I'm only able to disable from menu bar, not
from the right click menus. Any clue?

Please bear with me as I'm new to excel programming.

Thanks....



Reply
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
Insert tab disable CF Setting up and Configuration of Excel 3 April 1st 09 02:40 AM
disable Insert Worksheet jatman Excel Worksheet Functions 2 June 25th 08 06:40 AM
insert row / insert column command buttons fairgreen Excel Worksheet Functions 1 October 29th 07 02:41 PM
Disable Insert Column without protecting sheet. GS Excel Programming 0 February 5th 06 05:29 PM
How to completely disable Insert, Copy and Cut? MrPixie Excel Programming 1 May 18th 04 08:16 PM


All times are GMT +1. The time now is 12:22 AM.

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

About Us

"It's about Microsoft Excel"