+ Reply to Thread
Results 1 to 4 of 4

Hide Macro

  1. #1
    Forum Contributor
    Join Date
    02-12-2006
    Location
    London UK
    Posts
    109

    Hide Macro

    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?

  2. #2
    Norman Jones
    Guest

    Re: 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" <astrikor.23znwb_1141212902.1284@excelforum-nospam.com> wrote in
    message news:astrikor.23znwb_1141212902.1284@excelforum-nospam.com...
    >
    > 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. #3
    Paul B
    Guest

    Re: 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" <astrikor.23znwb_1141212902.1284@excelforum-nospam.com> wrote in
    message news:astrikor.23znwb_1141212902.1284@excelforum-nospam.com...
    >
    > 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. #4
    Forum Contributor
    Join Date
    02-12-2006
    Location
    London UK
    Posts
    109
    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
    Last edited by astrikor; 03-01-2006 at 08:06 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1