Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default How to protect excel workbook from macro starting from Developer - Code ribbon?

Hello,

in my excel workbook project I use a lot of VBA code where I open different
external data sources, hide and unhide some worksheets and do things that
shoul not be explicitly viewed by normal users. So I protected Visual Basic
code with a password what is probably not the best security (?) but it is
probably enough for our not so experienced internal users.

What disturbs me is but that the user can clicks on Macros icon from the
Developer - Code ribbon and then he can see the list of all my programs
defined in my Visual basics Modules. And not only see - the user can even
run any od these programs alone and on such way ,because of uncontrolled
treatment, he can cause unexpected consequences.

Is there any way how to disable user from such uncontrolled actions?

Ivan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default How to protect excel workbook from macro starting from Developer -

Hello Ivan,

You can start by putting "private" in front of your subs. It hides them from
the list of macros (you can still launch them if you type the name), but can
be problematic if you try to call a procedure from another module.

"Ivan" wrote:

Hello,

in my excel workbook project I use a lot of VBA code where I open different
external data sources, hide and unhide some worksheets and do things that
shoul not be explicitly viewed by normal users. So I protected Visual Basic
code with a password what is probably not the best security (?) but it is
probably enough for our not so experienced internal users.

What disturbs me is but that the user can clicks on Macros icon from the
Developer - Code ribbon and then he can see the list of all my programs
defined in my Visual basics Modules. And not only see - the user can even
run any od these programs alone and on such way ,because of uncontrolled
treatment, he can cause unexpected consequences.

Is there any way how to disable user from such uncontrolled actions?

Ivan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default How to protect excel workbook from macro starting from Developer -

I have suspected the solution of "private" functions and subs but the
problem is exactly in the (un)attainability of such code from the code of
worksheets, forms and other modules. As I understand the only way to reach
my goal now is to displace all code from modules to worksheets and forms. In
this way I lose by all means the universality od modul code!?

Ivan

"The Dude" wrote in message
...
Hello Ivan,

You can start by putting "private" in front of your subs. It hides them
from
the list of macros (you can still launch them if you type the name), but
can
be problematic if you try to call a procedure from another module.

"Ivan" wrote:

Hello,

in my excel workbook project I use a lot of VBA code where I open
different
external data sources, hide and unhide some worksheets and do things that
shoul not be explicitly viewed by normal users. So I protected Visual
Basic
code with a password what is probably not the best security (?) but it is
probably enough for our not so experienced internal users.

What disturbs me is but that the user can clicks on Macros icon from the
Developer - Code ribbon and then he can see the list of all my programs
defined in my Visual basics Modules. And not only see - the user can even
run any od these programs alone and on such way ,because of uncontrolled
treatment, he can cause unexpected consequences.

Is there any way how to disable user from such uncontrolled actions?

Ivan





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to protect excel workbook from macro starting from Developer -

Or simply add an option argument:
Public Sub addSummaryFxs(Optional arg = 3)
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
Can protect worksheet then workbook but not Protect and Share in code [email protected] Excel Programming 7 January 16th 17 07:01 AM
VBA button on Developer ribbon can not be clicked eliassal Excel Discussion (Misc queries) 2 December 20th 09 09:30 PM
Excel 2007 Record Macro button in Developer tab is not highlighted Golfnjohn Excel Discussion (Misc queries) 0 April 30th 08 09:31 PM
Running a macro to protect a workbook on a already protected workbook UNprotects the workbook ?? WimR Excel Programming 9 July 25th 05 12:44 PM
How to password protect several excel workbook pages using a macro p88t Excel Programming 2 September 28th 04 05:36 PM


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