Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable Open option in Excel Report from VB


Hi,

How to disable open option when I right click on the excel desktop.

By using the following code, I have successfully achieved the disabling
of open option from Menu bar and Toolbar.

Now I need to disable the same in the Excel desktop’s right Click.

Set mFileMenu = CommandBars.FindControl(ID:=30002) ' File Menu

If mFileMenu Is Nothing Then Exit Sub

For Each mOpenMenu In mFileMenu.Controls

If mOpenMenu.ID = 23 Then mOpenMenu.Enabled = False

Next mOpenMenu

Set mOpenMenu = Nothing

Set mFileMenu = Nothing



Set mOpenMenuToolBar = CommandBars.FindControl(ID:=23) ' Tool Bar

If mOpenMenuToolBar Is Nothing Then Exit Sub

mOpenMenuToolBar.Enabled = False

Set mOpenMenuToolBar = Nothing



We cannot lock the excel file completely, as we need some options like
Print, Save As etc.

Thanks in advance
ourspt


--
oursmp
------------------------------------------------------------------------
oursmp's Profile: http://www.excelforum.com/member.php...o&userid=22443
View this thread: http://www.excelforum.com/showthread...hreadid=478191

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
Save-As Option Disable Salman Excel Worksheet Functions 0 January 9th 07 12:09 PM
how can i enable or disable the paste option in excel 2000 mianmian Excel Worksheet Functions 0 September 2nd 05 09:57 AM
How can I globally disable the Hypertext link option in Excel? AnnieS Setting up and Configuration of Excel 1 February 18th 05 05:48 PM
Disable "Save As" Option Andy T Excel Discussion (Misc queries) 1 December 10th 04 10:23 AM
Disable 'Error Report' using VBA V-Man[_2_] Excel Programming 0 November 19th 04 02:27 PM


All times are GMT +1. The time now is 08:20 PM.

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"