#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Hiding VB Code

How do you hide the VB code from users?
My sheet is protected but when you right click on the sheet tab and select
View, you can see all the code - including the password that is "protecting"
the sheet.

John
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Hiding VB Code

Password protect the VBA project, ToolsProject PropertiesProtection

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"johnsail" wrote in message
...
How do you hide the VB code from users?
My sheet is protected but when you right click on the sheet tab and
select
View, you can see all the code - including the password that is
"protecting"
the sheet.

John



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Hiding VB Code

At the top of the module put
Option private module
and they can't see it from toolsmacros
Also, protect the macro project to deny access to most people.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"johnsail" wrote in message
...
How do you hide the VB code from users?
My sheet is protected but when you right click on the sheet tab and
select
View, you can see all the code - including the password that is
"protecting"
the sheet.

John


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Hiding VB Code

Hi Bob
Not sure what you mean here.
When I go into VBA project, ToolsProject Properties the project name
"VBAProject" is highlighted.
If i tyen go to protection and tick the box and enter a password it seems to
make no difference.

If I try to give the project a name it tells me that the name I have chosen
is not valid.
What am I missing?
Do I have to save the code in some special way?

John

"Bob Phillips" wrote:

Password protect the VBA project, ToolsProject PropertiesProtection

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"johnsail" wrote in message
...
How do you hide the VB code from users?
My sheet is protected but when you right click on the sheet tab and
select
View, you can see all the code - including the password that is
"protecting"
the sheet.

John




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Hiding VB Code

Hi Don

Don't understand what you mean here. Can you explain a bit further please.

John

"Don Guillett" wrote:

At the top of the module put
Option private module
and they can't see it from toolsmacros
Also, protect the macro project to deny access to most people.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"johnsail" wrote in message
...
How do you hide the VB code from users?
My sheet is protected but when you right click on the sheet tab and
select
View, you can see all the code - including the password that is
"protecting"
the sheet.

John





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Hiding VB Code

When you set a password on VBAProjectProtection "lock for viewing" you
must save and close the workbook.

When you re-open, the protection is functional.


Gord Dibben MS Excel MVP

On Mon, 9 Mar 2009 08:15:01 -0700, johnsail
wrote:

Hi Bob
Not sure what you mean here.
When I go into VBA project, ToolsProject Properties the project name
"VBAProject" is highlighted.
If i tyen go to protection and tick the box and enter a password it seems to
make no difference.

If I try to give the project a name it tells me that the name I have chosen
is not valid.
What am I missing?
Do I have to save the code in some special way?

John

"Bob Phillips" wrote:

Password protect the VBA project, ToolsProject PropertiesProtection

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"johnsail" wrote in message
...
How do you hide the VB code from users?
My sheet is protected but when you right click on the sheet tab and
select
View, you can see all the code - including the password that is
"protecting"
the sheet.

John





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Hiding VB Code


Pretty simple..
At the top of the module put
Option private module
and they can't see it from toolsmacros

type option private module as the top line in the module. Same as typing
private sub thissub() for each

Now goto toolsmacrosmacros and you will not see your macros anymore.
To work in the module comment out the line and then uncomment when through

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"johnsail" wrote in message
...
Hi Don

Don't understand what you mean here. Can you explain a bit further please.

John

"Don Guillett" wrote:

At the top of the module put
Option private module
and they can't see it from toolsmacros
Also, protect the macro project to deny access to most people.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"johnsail" wrote in message
...
How do you hide the VB code from users?
My sheet is protected but when you right click on the sheet tab and
select
View, you can see all the code - including the password that is
"protecting"
the sheet.

John




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
need code for hiding/unhiding sheets using checkboxes pzx8hf Excel Worksheet Functions 1 August 13th 08 12:11 AM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
Hiding a button when hiding rows fergusor Excel Discussion (Misc queries) 2 August 10th 06 02:31 PM
How to code Macro for hiding rows Catherine Bond Excel Worksheet Functions 4 June 24th 06 10:13 AM
Hiding Code Jae Excel Discussion (Misc queries) 3 August 10th 05 08:10 PM


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