+ Reply to Thread
Results 1 to 4 of 4

Protecting VBA code

  1. #1
    Registered User
    Join Date
    03-03-2005
    Location
    UK
    Posts
    26

    Protecting VBA code

    Hi all

    I'm have a protected VBA Worksheet. It has several Macros that run at various times. Several add new rows. oviously to do this i have to un-protect the workbook and then re-protect it via code.

    But while doing this my worksheet password will be avaliable in my code. I was wondering if anyone had any strategies for dealing with this e.g. password protecting vb code.

    Any thoughts would be welcome

    Thanks

    Nigel

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon Nigel_hough

    You can password protect a projects VBE by pressing Alt + F11 (open the VBE) and go to Tools > VBAProject properties,select the Protection tab, tick the Lock project bax and enter your password (twice).

    Then go to File > Close and return to Microsoft Excel.

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Here's a helpful link also


    http://www.ozgrid.com/VBA/protect-vba-code.htm

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Registered User
    Join Date
    03-03-2005
    Location
    UK
    Posts
    26

    Thumbs up Solved

    dominicb

    That was exactly what I wanted

    Thanks very much

+ 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