View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.programming
Peter Rooney Peter Rooney is offline
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