+ Reply to Thread
Results 1 to 4 of 4

password protection-is there anyway to put a password on running a macro in excel?

  1. #1
    Registered User
    Join Date
    05-26-2006
    Posts
    36

    password protection-is there anyway to put a password on running a macro in excel?

    quick question, is there anyway to put a password on running a macro in excel?

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419
    I assume you mean make sure whoevers trying to run this macro is allowed to.
    In which case you would need to write you own checking routine. Along with a userform to allow entry of said password.

    How is the user currently running the macro?
    Cheers
    Andy
    www.andypope.info

  3. #3
    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 Solarissf

    Something like this should work OK. The password I've used is "mypass" to run the macro "test". Make sure the macro to be password protected is declared as Private (as I have done) so that it can't be seen from the Tools > Macro > Macros dialog. Also be sure to password protect the VBE. One last thing to remember is this routine (or any similar to it) can be circumvented by a knowledgable user, so don't think it is 100% safe :
    Please Login or Register  to view this content.
    HTH

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

  4. #4
    Registered User
    Join Date
    05-26-2006
    Posts
    36
    this worked!!! thank you

+ 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. Password protection??
    By arfanvilla in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-14-2008, 04:16 AM
  2. Password Protection and default sheets
    By kevie192 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-29-2008, 07:19 AM
  3. Password Protection
    By fin_anal in forum Excel General
    Replies: 1
    Last Post: 12-03-2007, 05:43 PM
  4. Password protection...
    By dustyv in forum Excel General
    Replies: 3
    Last Post: 11-23-2006, 08:05 AM

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