Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 format menu disable | Setting up and Configuration of Excel | |||
How disable menu command on excel view | Excel Discussion (Misc queries) | |||
close WB after clicking DISABLE MACROS | Excel Programming | |||
Adding a menu item right click menu when clicking on a single. | Excel Programming | |||
Menu Items and Disable/Enable in Excel 2003 | Excel Programming |