#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hide Macro


I need to find some way of inhibiting access to macro code. I have a
autorun macro which needs to be able to run but which must not b
viewed or edited without a password.
"Private Sub test()" does hide the macro, but the code can still easil
be accessed by hitting "Esc" while it is running. Does anyone know ho
to introduce a password to enable access to code

--
astriko
-----------------------------------------------------------------------
astrikor's Profile: http://www.excelforum.com/member.php...fo&userid=3146
View this thread: http://www.excelforum.com/showthread.php?threadid=51774

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Hide Macro

Hi Astrikor.

In the VBE (Alt-F11), with the project of interest selected:
Tools | VBA Project Properties | Protection
Lock and supply a password (Do not forget p/word!!)
Save, close and reopen file.


---
Regards,
Norman



"astrikor" wrote in
message ...

I need to find some way of inhibiting access to macro code. I have an
autorun macro which needs to be able to run but which must not be
viewed or edited without a password.
"Private Sub test()" does hide the macro, but the code can still easily
be accessed by hitting "Esc" while it is running. Does anyone know how
to introduce a password to enable access to code?


--
astrikor
------------------------------------------------------------------------
astrikor's Profile:
http://www.excelforum.com/member.php...o&userid=31465
View this thread: http://www.excelforum.com/showthread...hreadid=517746



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Hide Macro

Protect the VBA project,

To protect the VBA project, from your workbook right-click the workbook's
icon and pick View Code. This icon is to the left of the "File" menu this
will open the VBA editor, in Project Explorer right click on your workbook
name, if you don't see it press CTRL + r to open the Project Explorer then
select VBA project properties, protection, check lock project for viewing
and set a password. Press Alt and Q to close this window and go back to your
workbook and save and close the file. Be aware that this password can be
broken by third party software

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"astrikor" wrote in
message ...

I need to find some way of inhibiting access to macro code. I have an
autorun macro which needs to be able to run but which must not be
viewed or edited without a password.
"Private Sub test()" does hide the macro, but the code can still easily
be accessed by hitting "Esc" while it is running. Does anyone know how
to introduce a password to enable access to code?


--
astrikor
------------------------------------------------------------------------
astrikor's Profile:

http://www.excelforum.com/member.php...o&userid=31465
View this thread: http://www.excelforum.com/showthread...hreadid=517746



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hide Macro


Thanks guys.

Normans suggestion works well - except that Tools/VBA Project
properties is not available on my excel 2000, but I can get there from
View/Project Explorer - then highlight project and so to Project
Properties etc.
Incidentally, before someone asks why I am still using excel 2000 its
because it is much faster than 2003.
Astrikor


--
astrikor
------------------------------------------------------------------------
astrikor's Profile: http://www.excelforum.com/member.php...o&userid=31465
View this thread: http://www.excelforum.com/showthread...hreadid=517746

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
Hide a Macro [email protected] Excel Discussion (Misc queries) 2 July 26th 07 09:12 AM
macro to hide row with 0.00 Lori Excel Worksheet Functions 2 April 25th 07 08:56 PM
hide macro GM[_4_] Excel Programming 1 January 27th 05 03:46 PM
Hide row macro John F[_2_] Excel Programming 1 November 11th 04 09:05 PM
more help with a hide macro Awoll Excel Programming 3 December 11th 03 08:37 PM


All times are GMT +1. The time now is 11:39 PM.

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"