Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Hide Macro from View Q

I have some code that I use in developing sheets, things like
"unprotect all" sheets etc, standard stuff that I like to keepwithin
sheets. Problem with this is that a User with a small bit of knowledge
can simply go to Tool-Macro and run the "unprotect all" code, which
can free up a lot. Is there any simple way around this, apart from
removing the macro itself?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Hide Macro from View Q

Sean

Make the Subs Private to prevent users from seeing them in ToolsMacro

In addition you could protect the VBA Project.

Select the project and right-clickvbaproject propertiesprotectionlock for
viewing.

Provide a password and save.re-open the workbook.

Alternative...............place all your macros into a new workbook then save as
an add-in which you load through toolsadd-ins.


Gord Dibben MS Excel MVP


On Sat, 1 Dec 2007 08:15:22 -0800 (PST), Sean wrote:

I have some code that I use in developing sheets, things like
"unprotect all" sheets etc, standard stuff that I like to keepwithin
sheets. Problem with this is that a User with a small bit of knowledge
can simply go to Tool-Macro and run the "unprotect all" code, which
can free up a lot. Is there any simple way around this, apart from
removing the macro itself?

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Hide Macro from View Q

Thanks Gordon, I have the VBA project password protected already.

Q - Difference between private and Public, what is that? apart from
the fact that the user can't see within Tool-Macro.

How do you make a macro private?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Hide Macro from View Q

You can also add Option Private Module at the top of the module(s). That
will hide the macros from the Tools-Macros dialog.

--
Tim Zych
SF, CA

"Sean" wrote in message
...
I have some code that I use in developing sheets, things like
"unprotect all" sheets etc, standard stuff that I like to keepwithin
sheets. Problem with this is that a User with a small bit of knowledge
can simply go to Tool-Macro and run the "unprotect all" code, which
can free up a lot. Is there any simple way around this, apart from
removing the macro itself?

Thanks



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Hide Macro from View Q

Thanks for jumping in Tim.

Less work than adding Private to each Sub which would be the answer to

How do you make "a" macro private?


Gord

On Sat, 1 Dec 2007 12:01:00 -0800, "Tim Zych" <tzych@NOSp@mE@RTHLINKDOTNET
wrote:

You can also add Option Private Module at the top of the module(s). That
will hide the macros from the Tools-Macros dialog.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Hide Macro from View Q

Classic guys, thanks, I always thought that code within the sheet and
not a standard module was "Private" - thanks



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
Show/hide feature to view formatting Cleo Excel Discussion (Misc queries) 1 March 30th 09 07:23 PM
How to hide negative value view (eg: #######) Dags Excel Discussion (Misc queries) 2 July 16th 07 08:46 AM
Simple CHeck box to view/hide rows Shelly Excel Programming 1 March 28th 07 06:57 PM
Simple CHeck box to view/hide rows Jay Excel Programming 2 March 28th 07 01:06 AM
vb hide the excel view bigandyt Excel Programming 1 June 29th 04 11:58 PM


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