+ Reply to Thread
Results 1 to 3 of 3

Hidding vba code and lock cells??

  1. #1
    Registered User
    Join Date
    10-04-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    16

    Hidding vba code and lock cells??

    Hii All,

    Please ,I Really Need a Urgent Solution for this problem...

    1) Is it possible to hide all the Vba project code's in worksheet from all other user??? i tried to put a password for vba project veiwing so far the password is working for my workbook ,BUT Even the Vba project viweing is locked with password ,when I try to move or copy any sheet from my workbbok to another workbook, my codes also moving without any password protection and is viewable in other workbook which is a BIG Problem, Is there any way out to secure everything in my workbook??? or freezing move /copy and add new sheet option so that no one can see the workbook codes?

    2) Is there VBA solution to lock and hide for selected cells in worksheet so that no one can see the formula and no one can change anything on the selected cells without protecting sheet..

    Thank you.

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Hidding vba code and lock cells??

    Of course no method is going to fully protect your file. It basically keeps the casual and mostly honest user from making critical changes.

    No, you can not protect the sheet contents if you don't lock the cells and protect the sheet. If you are storing sensitive information, protect the sheet and only allow a secure user to change it. e.g. If Environ("username")='"yours" then a macro would unhide the sheet and then rehide it when you change sheets.

    I normally set each sheet's Protect with UserInterfaceOnly:=True in ThisWorkbook's Open event so code can make changes without sheet Unprotect/Protect.

    Some have hidden all sheets but one at workbook Close and set sheet visible to normal at Open based on username.

    Cell Number Format can be set to ;;; to "hide" the value but the formula bar will show the value.

  3. #3
    Registered User
    Join Date
    10-04-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    16

    Re: Hidding vba code and lock cells??

    ok Thank You..
    Last edited by Ronni1991; 11-28-2017 at 03:26 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Lock cells so they cannot be deleted by other VBA code
    By ThisGuyJohnny in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-31-2017, 08:31 PM
  2. vba code for hidding the formula
    By rana19 in forum Excel General
    Replies: 11
    Last Post: 09-09-2015, 12:53 AM
  3. [SOLVED] Add vba code to lock cells on data entry
    By timetoshine in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-11-2014, 08:36 AM
  4. VBA Code to lock and unlock cells.
    By gerald6126 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-26-2013, 03:08 PM
  5. How to lock header cells in the following code
    By gamaz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-29-2009, 05:59 PM
  6. Lock cells based on value of other cells - code simplification query
    By glenin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-07-2009, 03:11 AM
  7. lock cells in a book with VBA code
    By gtserkou in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-09-2008, 10:47 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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1