ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to disable VIEW CODE in the tab of a workbook (https://www.excelbanter.com/excel-programming/293632-how-disable-view-code-tab-workbook.html)

Marcello do Guzman

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

JE McGimpsey

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


Greg Wilson[_4_]

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
.


Martyn

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




Dave Peterson[_3_]

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


JE McGimpsey

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?


Martyn

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.






All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com