Consulting

Results 1 to 13 of 13

Thread: how to protect vba code in excel

  1. #1
    VBAX Regular
    Joined
    Dec 2015
    Posts
    10
    Location

    how to protect vba code in excel

    Hi frnds I m new to excel Vba codesI ve designed a userform for myself and wrote some codes and events for itI used Vba properties to protect it with password ,but I saw an article which there was a code that easily could crack my excel 2013 vba password !!!I'm wondering if is there any way that we could protect our file codes from others to crack it so easily like this ??

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,888
    cross posted in at least 2 other places.

  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,092
    Location
    Firstly, may I say that I'm disappointed in your habit of cross posting the same issue on a number of forums. Secondly, sadly the answer to your thread is "No". Excel has never been secure, and given the number of releases, I don't think Microsoft has a solution to the problem.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  4. #4
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,710
    Location
    Use very complex passwords to make it a little harder and maybe the Crackers will give up

    MyPassword:="@F4%*>D8?@%(<%*G +/:...B9*#_2+AA*>{_%*@&"

    Hint: Use no Alpha Characters except A to F and no more than 2 numerals in a row. (12 but not 123) and no more than two Alphas in a Row (AB but not ABC)
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  5. #5
    Wow, how do you ever remember the password?

  6. #6
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,888
    He uses the same one all the time, including banking.

  7. #7
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,092
    Location
    Quote Originally Posted by p45cal View Post
    He uses the same one all the time, including banking.
    ROFl..... well it comes with age.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  8. #8
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,710
    Location
    I had it tattooed on the back of my hand

    In Sanskrit, so no one else could read it.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  9. #9
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,715
    Location
    http://cpap.com.br/orlando/XLtoExeMo...dC=OrlMoreWin2

    I think that this can make an XLSM into a encrypted file (not just protected) that requires a special executable to unencrypt it in memory

    Making the exe files would most likely have a much harder to crack password
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  10. #10
    Have a look at this tool: http://www.spreadsheet1.com/unviewab...for-excel.html works a treat.
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  11. #11
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,092
    Location
    G'day JKP, had a quick read of the info at the site you kindly linked to, but remain somewhat disallusioned. There seemed to be exceptions for most normal expected behaviours. When you suggest it works treat, can I assume you yourself are currently using the software with great success?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  12. #12
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,733
    Location
    Quote Originally Posted by SamT View Post
    Use very complex passwords to make it a little harder
    FYI, this doesn't actually make any difference to breaking through VBA security.
    Be as you wish to seem

  13. #13
    My RefTreeAnalyser has the protection implemented. www.jkp-ads.com/reftreeanalyser.asp
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

Posting Permissions

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