Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Disable Right Clicking of Excel logo on Standard menu Bar

Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Disable Right Clicking of Excel logo on Standard menu Bar

Hi Peter

It is easier to protect the VBA code with a password
In the VBA editor go to ToolsVBA project properties

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


"Peter Rooney" wrote in message ...
Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Disable Right Clicking of Excel logo on Standard menu Bar

Thanks, Ron, that worked just fine.

Are there any ways in which I can disable the other commands on the shortcut
menu to, for instance, prevent the creation of a new workbook?

Regards

Pete



"Ron de Bruin" wrote:

Hi Peter

It is easier to protect the VBA code with a password
In the VBA editor go to ToolsVBA project properties

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


"Peter Rooney" wrote in message ...
Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Disable Right Clicking of Excel logo on Standard menu Bar

Hi Peter

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


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


"Peter Rooney" wrote in message ...
Thanks, Ron, that worked just fine.

Are there any ways in which I can disable the other commands on the shortcut
menu to, for instance, prevent the creation of a new workbook?

Regards

Pete



"Ron de Bruin" wrote:

Hi Peter

It is easier to protect the VBA code with a password
In the VBA editor go to ToolsVBA project properties

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


"Peter Rooney" wrote in message
...
Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Disable Right Clicking of Excel logo on Standard menu Bar

Ron,

This is extremely useful, as I have some knowledge of manipulating menus,
but I can't for the life of me see how to refer to the menu displayed when
you right click the Excel logo..!

Sorry to be dim, but do you know, please? I tried to delete all the commands
in the Worksheet menu bar with a for each, but the Excel logo's still there!
RRRRRRRR!

Thanks

Pete



"Ron de Bruin" wrote:

Hi Peter

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


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


"Peter Rooney" wrote in message ...
Thanks, Ron, that worked just fine.

Are there any ways in which I can disable the other commands on the shortcut
menu to, for instance, prevent the creation of a new workbook?

Regards

Pete



"Ron de Bruin" wrote:

Hi Peter

It is easier to protect the VBA code with a password
In the VBA editor go to ToolsVBA project properties

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


"Peter Rooney" wrote in message
...
Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Disable Right Clicking of Excel logo on Standard menu Bar

Hi Peter

Protect your workbook with Windows checked in ToolsProtection

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


"Peter Rooney" wrote in message ...
Ron,

This is extremely useful, as I have some knowledge of manipulating menus,
but I can't for the life of me see how to refer to the menu displayed when
you right click the Excel logo..!

Sorry to be dim, but do you know, please? I tried to delete all the commands
in the Worksheet menu bar with a for each, but the Excel logo's still there!
RRRRRRRR!

Thanks

Pete



"Ron de Bruin" wrote:

Hi Peter

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


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


"Peter Rooney" wrote in message
...
Thanks, Ron, that worked just fine.

Are there any ways in which I can disable the other commands on the shortcut
menu to, for instance, prevent the creation of a new workbook?

Regards

Pete



"Ron de Bruin" wrote:

Hi Peter

It is easier to protect the VBA code with a password
In the VBA editor go to ToolsVBA project properties

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


"Peter Rooney" wrote in message
...
Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete










  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Disable Right Clicking of Excel logo on Standard menu Bar

Ron,

Just the job - have a green tick, with my thanks! :-)

Pete



"Ron de Bruin" wrote:

Hi Peter

Protect your workbook with Windows checked in ToolsProtection

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


"Peter Rooney" wrote in message ...
Ron,

This is extremely useful, as I have some knowledge of manipulating menus,
but I can't for the life of me see how to refer to the menu displayed when
you right click the Excel logo..!

Sorry to be dim, but do you know, please? I tried to delete all the commands
in the Worksheet menu bar with a for each, but the Excel logo's still there!
RRRRRRRR!

Thanks

Pete



"Ron de Bruin" wrote:

Hi Peter

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


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


"Peter Rooney" wrote in message
...
Thanks, Ron, that worked just fine.

Are there any ways in which I can disable the other commands on the shortcut
menu to, for instance, prevent the creation of a new workbook?

Regards

Pete



"Ron de Bruin" wrote:

Hi Peter

It is easier to protect the VBA code with a password
In the VBA editor go to ToolsVBA project properties

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


"Peter Rooney" wrote in message
...
Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete











  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Disable Right Clicking of Excel logo on Standard menu Bar

You are welcome

Have a nice day

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


"Peter Rooney" wrote in message ...
Ron,

Just the job - have a green tick, with my thanks! :-)

Pete



"Ron de Bruin" wrote:

Hi Peter

Protect your workbook with Windows checked in ToolsProtection

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


"Peter Rooney" wrote in message
...
Ron,

This is extremely useful, as I have some knowledge of manipulating menus,
but I can't for the life of me see how to refer to the menu displayed when
you right click the Excel logo..!

Sorry to be dim, but do you know, please? I tried to delete all the commands
in the Worksheet menu bar with a for each, but the Excel logo's still there!
RRRRRRRR!

Thanks

Pete



"Ron de Bruin" wrote:

Hi Peter

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


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


"Peter Rooney" wrote in message
...
Thanks, Ron, that worked just fine.

Are there any ways in which I can disable the other commands on the shortcut
menu to, for instance, prevent the creation of a new workbook?

Regards

Pete



"Ron de Bruin" wrote:

Hi Peter

It is easier to protect the VBA code with a password
In the VBA editor go to ToolsVBA project properties

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


"Peter Rooney" wrote in message
...
Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete













  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default Disable Right Clicking of Excel logo on Standard menu Bar

Peter:

try

Application.CommandBars("Document").Enabled = False

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Disable Right Clicking of Excel logo on Standard menu Bar

Chijanzen,

Thankfully it's hometime, but I'll give your suggestion a try first thing in
the morning.

Thank you

Pete



"chijanzen" wrote:

Peter:

try

Application.CommandBars("Document").Enabled = False

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Disable Right Clicking of Excel logo on Standard menu Bar

ChiJanZen,

I couldn't wait.

This is excellent!

Thank you VERY much!

Regards

Pete



"chijanzen" wrote:

Peter:

try

Application.CommandBars("Document").Enabled = False

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete


  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default Disable Right Clicking of Excel logo on Standard menu Bar

Peter:

Other method,only Disabled viewing code CommandBarControl

Sub DisabledViewCode()
Dim Ctrl As CommandBarControl
For Each Ctrl In CommandBars.FindControls
If Ctrl.ID = 1561 Then
Ctrl.Enabled = False
End If
Next
End Sub

Sub EnabledViewCode()
Dim Ctrl As CommandBarControl
For Each Ctrl In CommandBars.FindControls
If Ctrl.ID = 1561 Then
Ctrl.Enabled = True
End If
Next
End Sub


--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

ChiJanZen,

I couldn't wait.

This is excellent!

Thank you VERY much!

Regards

Pete



"chijanzen" wrote:

Peter:

try

Application.CommandBars("Document").Enabled = False

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete


  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Disable Right Clicking of Excel logo on Standard menu Bar

For the OP

Note: this is not working in Excel 97

You must use this then
(working in 97-2003)

Sub MenuControl_Enabled_False()
' Excel 97 - 2003
Dim Ctl As CommandBarControl
Dim Cbar As Integer

On Error Resume Next
For Cbar = 1 To Application.CommandBars.Count
For Each Ctl In Application.CommandBars(Cbar).Controls
Application.CommandBars(Cbar).FindControl(Id:=1561 , _
Recursive:=True).Enabled = False
Next Ctl
Next Cbar
On Error GoTo 0
End Sub

Sub MenuControl_Enabled_True()
' Excel 97 - 2003
Dim Ctl As CommandBarControl
Dim Cbar As Integer

On Error Resume Next
For Cbar = 1 To Application.CommandBars.Count
For Each Ctl In Application.CommandBars(Cbar).Controls
Application.CommandBars(Cbar).FindControl(Id:=1561 , _
Recursive:=True).Enabled = True
Next Ctl
Next Cbar
On Error GoTo 0
End Sub


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


"chijanzen" wrote in message ...
Peter:

Other method,only Disabled viewing code CommandBarControl

Sub DisabledViewCode()
Dim Ctrl As CommandBarControl
For Each Ctrl In CommandBars.FindControls
If Ctrl.ID = 1561 Then
Ctrl.Enabled = False
End If
Next
End Sub

Sub EnabledViewCode()
Dim Ctrl As CommandBarControl
For Each Ctrl In CommandBars.FindControls
If Ctrl.ID = 1561 Then
Ctrl.Enabled = True
End If
Next
End Sub


--
???,???????
???,???????

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

ChiJanZen,

I couldn't wait.

This is excellent!

Thank you VERY much!

Regards

Pete



"chijanzen" wrote:

Peter:

try

Application.CommandBars("Document").Enabled = False

--
???,???????
???,???????

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete




  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Disable Right Clicking of Excel logo on Standard menu Bar

Chijanzen,

My nine year old son "What did you at work today, dad?" was totally
intrigued by the fact that you'd signed your name in Chinese characters! I
had to explain to him that the rest of your message was in English, because
he had no idea how I'd understood your reply! :-)

Once again, another useful solution. between you and Ron, I can now either
hide the Excel logo altogether, display but disable it, or disable specific
commands within its shortcut menu! Not bad for an afternoon's work!

Once again, thank you very much.

Pete



"chijanzen" wrote:

Peter:

Other method,only Disabled viewing code CommandBarControl

Sub DisabledViewCode()
Dim Ctrl As CommandBarControl
For Each Ctrl In CommandBars.FindControls
If Ctrl.ID = 1561 Then
Ctrl.Enabled = False
End If
Next
End Sub

Sub EnabledViewCode()
Dim Ctrl As CommandBarControl
For Each Ctrl In CommandBars.FindControls
If Ctrl.ID = 1561 Then
Ctrl.Enabled = True
End If
Next
End Sub


--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

ChiJanZen,

I couldn't wait.

This is excellent!

Thank you VERY much!

Regards

Pete



"chijanzen" wrote:

Peter:

try

Application.CommandBars("Document").Enabled = False

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete


  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default Disable Right Clicking of Excel logo on Standard menu Bar

Peter :

I live in Taiwan

My English not too good

Please do not mind

chijanzen
--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

Chijanzen,

My nine year old son "What did you at work today, dad?" was totally
intrigued by the fact that you'd signed your name in Chinese characters! I
had to explain to him that the rest of your message was in English, because
he had no idea how I'd understood your reply! :-)

Once again, another useful solution. between you and Ron, I can now either
hide the Excel logo altogether, display but disable it, or disable specific
commands within its shortcut menu! Not bad for an afternoon's work!

Once again, thank you very much.

Pete



"chijanzen" wrote:

Peter:

Other method,only Disabled viewing code CommandBarControl

Sub DisabledViewCode()
Dim Ctrl As CommandBarControl
For Each Ctrl In CommandBars.FindControls
If Ctrl.ID = 1561 Then
Ctrl.Enabled = False
End If
Next
End Sub

Sub EnabledViewCode()
Dim Ctrl As CommandBarControl
For Each Ctrl In CommandBars.FindControls
If Ctrl.ID = 1561 Then
Ctrl.Enabled = True
End If
Next
End Sub


--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

ChiJanZen,

I couldn't wait.

This is excellent!

Thank you VERY much!

Regards

Pete



"chijanzen" wrote:

Peter:

try

Application.CommandBars("Document").Enabled = False

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete




  #16   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Disable Right Clicking of Excel logo on Standard menu Bar

Chijanzen,

It's not a problem - your English is superb! :-)

I understood exactly what you meant and you solved the problem for me.

My son is interested in your part of the world (even if it's because he
loves Disney's "Mulan") and thought it was cool to have somebody writing to
me using (Mandarin/Cantonese?) characters!

Thanks again.

Hope all is well in Taiwan

Pete



"chijanzen" wrote:

Peter :

I live in Taiwan

My English not too good

Please do not mind

chijanzen
--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

Chijanzen,

My nine year old son "What did you at work today, dad?" was totally
intrigued by the fact that you'd signed your name in Chinese characters! I
had to explain to him that the rest of your message was in English, because
he had no idea how I'd understood your reply! :-)

Once again, another useful solution. between you and Ron, I can now either
hide the Excel logo altogether, display but disable it, or disable specific
commands within its shortcut menu! Not bad for an afternoon's work!

Once again, thank you very much.

Pete



"chijanzen" wrote:

Peter:

Other method,only Disabled viewing code CommandBarControl

Sub DisabledViewCode()
Dim Ctrl As CommandBarControl
For Each Ctrl In CommandBars.FindControls
If Ctrl.ID = 1561 Then
Ctrl.Enabled = False
End If
Next
End Sub

Sub EnabledViewCode()
Dim Ctrl As CommandBarControl
For Each Ctrl In CommandBars.FindControls
If Ctrl.ID = 1561 Then
Ctrl.Enabled = True
End If
Next
End Sub


--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

ChiJanZen,

I couldn't wait.

This is excellent!

Thank you VERY much!

Regards

Pete



"chijanzen" wrote:

Peter:

try

Application.CommandBars("Document").Enabled = False

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Peter Rooney" wrote:

Good afternoon, all,

I want to be able to prevent users from viewing my code. I've already
disabled Alt-F11 using application.onkey, but they can still get to it by
right clicking the Excel logo on the Standard Menu Bar. Is there any way in
which I can reference this as an object, to either disable it or remove it
from the menu bar?

Thanks in advance

Pete


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
Excel 2003 format menu disable it Setting up and Configuration of Excel 1 October 29th 07 02:15 PM
How disable menu command on excel view Armangelo Excel Discussion (Misc queries) 0 February 1st 06 10:04 AM
close WB after clicking DISABLE MACROS Mario M Excel Programming 1 July 26th 05 12:51 PM
Adding a menu item right click menu when clicking on a single. Andoni[_28_] Excel Programming 0 September 2nd 04 10:23 PM
Menu Items and Disable/Enable in Excel 2003 [email protected] Excel Programming 1 February 6th 04 08:14 PM


All times are GMT +1. The time now is 10:36 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"