Results 1 to 3 of 3

Thread: Protect and hide all macros in a worksheet

  1. #1
    Join Date
    Aug 2006
    Posts
    162

    Protect and hide all macros in a worksheet

    Hi,
    I put Option Private Module in the Module ... which removes all Macros from the list of macros ... but they are still visible if you press ALT-F11, Is there a way to hide/protect the code, so a user cannot see it at all? I have the workbook password in the code for example:

    sheets.("Sheet1").Unprotect ("xxxx")

    I don't want the user to see what the password is, so is there a way to hide the code so that the user cannot see it?

    Thanks In Advance
    Technology is a way of organizing the universe so that man doesn't have to experience it.-- Max Frisch 1911 -1991

  2. #2
    Join Date
    Jan 2008
    Posts
    3,755

    Re: Protect and hide all macros in a worksheet

    In the left panel of the VBEditor, right-click on the VBAProject Properties and set security in there, add a password and save it.

    Next time you open the sheet, the project is hidden even if the editor is opened. You will need the password to access it.

  3. #3
    Join Date
    Apr 2008
    Posts
    2,139

    Re: Protect and hide all macros in a worksheet

    In VBA, Goto Tools-->Project Properties-->Protection-->Lock Project for Viewing.

    Add a password to make sure that if anyone stumbles into VBA, they can't unlock the project.

    Note that your macro list will be viewable and they can be executied from Tools-->Macros, but they cannot be edited.

Similar Threads

  1. Replies: 3
    Last Post: 31-12-2011, 05:21 PM
  2. Replies: 8
    Last Post: 04-12-2011, 11:24 AM
  3. How to hide certain pages of Excel worksheet
    By EricTheRed in forum Tips & Tweaks
    Replies: 1
    Last Post: 12-05-2011, 05:40 AM
  4. Auto-Hide toolbar won't hide?
    By Geoff from LA in forum Vista Help
    Replies: 8
    Last Post: 18-10-2009, 06:52 AM
  5. Replies: 2
    Last Post: 20-04-2008, 02:08 AM

Tags for this Thread

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
  •  
Page generated in 1,713,927,707.69495 seconds with 17 queries