Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default How to disable VIEW CODE in the tab of a workbook

I hope someone can help me with this. I have been able to disable the
shortcut keys to prevent people from viewing my macros, running the
macro editor, added password to my macros and so fort, but need to
find a way to hide or disable people from right clicking on the tab
and viewing the VIEW CODE selection. How can I grey this out?
Please email with answer at:



thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default How to disable VIEW CODE in the tab of a workbook

This really isn't likely to do you any good since any VBA solution you
come up with can be defeated by opening your workbook with macros
disabled.

However, you can do it using:

Application.CommandBars("Ply").Controls("View Code").Enabled = False

Even with macros enabled, a sufficiently clever person might bypass this
by creating a toolbar with the View Code or Visual Basic Editor control
button on it. I normally replace the standard toolbar with one I create
that has a button like that.


In article ,
Marcello do Guzman wrote:

I hope someone can help me with this. I have been able to disable the
shortcut keys to prevent people from viewing my macros, running the
macro editor, added password to my macros and so fort, but need to
find a way to hide or disable people from right clicking on the tab
and viewing the VIEW CODE selection. How can I grey this out?
Please email with answer at:



thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 218
Default How to disable VIEW CODE in the tab of a workbook

Correct for wordwrap:-
Application.CommandBars("Ply").Controls("View
Code").Enabled = False 'True to enable again

Regards,
Greg

-----Original Message-----
I hope someone can help me with this. I have been able

to disable the
shortcut keys to prevent people from viewing my macros,

running the
macro editor, added password to my macros and so fort,

but need to
find a way to hide or disable people from right clicking

on the tab
and viewing the VIEW CODE selection. How can I grey this

out?
Please email with answer at:



thanks in advance
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default How to disable VIEW CODE in the tab of a workbook

And can you please share your knowledge, how have you been able to disable
the shortcut keys for viewing macros?

"Marcello do Guzman" wrote in message
...
I hope someone can help me with this. I have been able to disable the
shortcut keys to prevent people from viewing my macros, running the
macro editor, added password to my macros and so fort, but need to
find a way to hide or disable people from right clicking on the tab
and viewing the VIEW CODE selection. How can I grey this out?
Please email with answer at:



thanks in advance



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default How to disable VIEW CODE in the tab of a workbook

When you password protected the project, didn't that stop the user from seeing
your code?

If it didn't, then maybe you didn't check the:
"lock project for viewing"
under tools|VBAProject Properties|General Tab

Marcello do Guzman wrote:

I hope someone can help me with this. I have been able to disable the
shortcut keys to prevent people from viewing my macros, running the
macro editor, added password to my macros and so fort, but need to
find a way to hide or disable people from right clicking on the tab
and viewing the VIEW CODE selection. How can I grey this out?
Please email with answer at:



thanks in advance


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default How to disable VIEW CODE in the tab of a workbook

One way:

Application.OnKey "%{F11}",""

though, since nearly all shortcut keys are fully customizable (at least
in MacXL), there's no guarantee that this is the, or the only, keyboard
shortcut for viewing macros.


In article ,
"Martyn" wrote:

And can you please share your knowledge, how have you been able to disable
the shortcut keys for viewing macros?

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default How to disable VIEW CODE in the tab of a workbook

Thanks JE

"JE McGimpsey" wrote in message
...
One way:

Application.OnKey "%{F11}",""

though, since nearly all shortcut keys are fully customizable (at least
in MacXL), there's no guarantee that this is the, or the only, keyboard
shortcut for viewing macros.




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
Code to disable a cell in excel Athens Excel Discussion (Misc queries) 2 February 20th 07 04:52 PM
How disable menu command on excel view Armangelo Excel Discussion (Misc queries) 0 February 1st 06 10:04 AM
Disable VBA code execution when loading a workbook Charles Excel Discussion (Misc queries) 4 October 14th 05 09:12 PM
Disable/Enable Macros through code ibeetb Excel Programming 3 December 7th 03 05:24 AM
Disable Code Alan Excel Programming 1 November 30th 03 07:06 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"