PC Review


Reply
Thread Tools Rate Thread

Disabling Pop Up Menu Options

 
 
markb
Guest
Posts: n/a
 
      29th Jul 2008
I have a spreadsheet that I want to protect from the user inserting or
deleting columns.

I have this code right now:

With Application.CommandBars("Cell")
iPostion = .Controls("Delete...").Index
Set cBut = .Controls.Add(Before:=iPostion, Temporary:=True)
.Controls("Delete...").Delete
.Controls("insert...").Delete
End With
On Error GoTo 0
Application.EnableAutoComplete = False
Application.ErrorCheckingOptions.BackgroundChecking = False
Application.ErrorCheckingOptions.IndicatorColorIndex = 2
Application.MoveAfterReturnDirection = xlToRight


It does fine for disabling the drop downs from the menu bars, but the user
can still right-click and delete. How can I disable that option?

Thank you,
--
Markb
 
Reply With Quote
 
 
 
 
Squeaky
Guest
Posts: n/a
 
      29th Jul 2008
If you protect the spreadsheet you cannot add or delete columns.

"markb" wrote:

> I have a spreadsheet that I want to protect from the user inserting or
> deleting columns.
>
> I have this code right now:
>
> With Application.CommandBars("Cell")
> iPostion = .Controls("Delete...").Index
> Set cBut = .Controls.Add(Before:=iPostion, Temporary:=True)
> .Controls("Delete...").Delete
> .Controls("insert...").Delete
> End With
> On Error GoTo 0
> Application.EnableAutoComplete = False
> Application.ErrorCheckingOptions.BackgroundChecking = False
> Application.ErrorCheckingOptions.IndicatorColorIndex = 2
> Application.MoveAfterReturnDirection = xlToRight
>
>
> It does fine for disabling the drop downs from the menu bars, but the user
> can still right-click and delete. How can I disable that option?
>
> Thank you,
> --
> Markb

 
Reply With Quote
 
markb
Guest
Posts: n/a
 
      31st Jul 2008
Well, that works great. Sometimes it pays to think a little simpler. thank
you for the help!
--
Markb


"Squeaky" wrote:

> If you protect the spreadsheet you cannot add or delete columns.
>
> "markb" wrote:
>
> > I have a spreadsheet that I want to protect from the user inserting or
> > deleting columns.
> >
> > I have this code right now:
> >
> > With Application.CommandBars("Cell")
> > iPostion = .Controls("Delete...").Index
> > Set cBut = .Controls.Add(Before:=iPostion, Temporary:=True)
> > .Controls("Delete...").Delete
> > .Controls("insert...").Delete
> > End With
> > On Error GoTo 0
> > Application.EnableAutoComplete = False
> > Application.ErrorCheckingOptions.BackgroundChecking = False
> > Application.ErrorCheckingOptions.IndicatorColorIndex = 2
> > Application.MoveAfterReturnDirection = xlToRight
> >
> >
> > It does fine for disabling the drop downs from the menu bars, but the user
> > can still right-click and delete. How can I disable that option?
> >
> > Thank you,
> > --
> > Markb

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling menu options in a Custom Menu =?Utf-8?B?VkJBZ3JvdXBpZQ==?= Microsoft Access 4 9th Mar 2006 08:00 PM
Outlook 2003 Menu Options Disabled (New, Reply, Options, etc greyed out) Christopher Microsoft Outlook 1 29th Jul 2004 07:45 AM
Disabling Menu Options Neil Warwick Microsoft Excel Programming 1 18th Jan 2004 10:02 PM
Disabling standart menu options Dusan Microsoft Excel Programming 3 24th Nov 2003 11:30 AM
Disabling some menu options in IE 6 Graham Lord Windows XP Customization 1 23rd Nov 2003 10:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:33 PM.