none
Excel VBA Security RRS feed

  • General discussion

  • Hi Team,

    Q1: There are multiple free software to break the VBA password protection. So, any body can see the VBA coding by downloading the VBA password breaker. Why VBA password not as secure as Worksheet or workbook protection?

    Q2: 

    Can I link a worksheet cell to this --- Activesheet.unprotect Password or Activesheet.protect?

    • Edited by Karan1214 Saturday, May 2, 2015 9:29 PM Missing something
    Saturday, May 2, 2015 9:26 PM

All replies

  • Unfortunately the password protection in Excel is not overly secure and this comment includes Worksheet protection and Workbook protection. Rather like door locks; they keep the honest people out and while some are more secure than others, people with sufficient knowledge still manage to open them.

    Regards, OssieMac

    Sunday, May 3, 2015 12:07 AM
  • Thanks OssieMac. Any chances in future for more security? And Can I link a worksheet cell to this --- Activesheet.unprotect Password or Activesheet.protect?
    Sunday, May 3, 2015 5:53 AM
  • Thanks OssieMac. Any chances in future for more security? And Can I link a worksheet cell to this --- Activesheet.unprotect Password or Activesheet.protect?

    I am not sure what you mean. Do you mean can you use a cell on the worksheet to hold the password? If so then don't use ActiveSheet unless you are going to place a password on every sheet at the same cell address.

    Excel opens the workbook at whatever worksheet was active at the time of saving and therefore referencing the active sheet may not find the password.

    My suggestion is to be specific with the worksheet and use the worksheet code name. The code name is not easily changed by the user because it can only be done in the Project Explorer in the VBA editor. The Worksheet code name can be viewed in the Project Explorer (left column of VBA editor). The CodeName is the name NOT in brackets and the tab name that the user can change is the name enclosed in brackets.

    Note when using the code name in VBA code, you use it just like a worksheet object variable and don't use like following that only works with the worksheet tab name.

    Worksheets("Name")

    Examples for storing a password in a worksheet cell:

    Sheet1.Protect Password:=Sheet1.Range("B3")

    Sheet1.Unprotect Password:=Sheet1.Range("B3")


    Regards, OssieMac

    Sunday, May 3, 2015 7:25 AM
  • Any chances in future for more security?

    I don't work for Microsoft. I simply volunteer my time to help others on this forum. I do not have an influence on what Microsoft does and neither am I privy their future plans.

    You could try searching for where you can provide feedback to Microsoft but I have not had a lot of joy attempting to do this.


    Regards, OssieMac

    Sunday, May 3, 2015 7:36 AM
  • Thanks a lot for your kind help in this issue... 

    Sheet1.Protect Password:=Sheet1.Range("B3") does work for me. Thanks.

    Just a general question... what do you think about the future of MS Excel (I am a BIG fan of Excel just FYI) or Powerview/Powerpivot as we see lot of new BI solutions in the market these days and the requirement for Big data.

    Sunday, May 3, 2015 8:30 PM
  • Just a general question... what do you think about the future of MS Excel (I am a BIG fan of Excel just FYI) or Powerview/Powerpivot as we see lot of new BI solutions in the market these days and the requirement for Big data.

    I am not an expert in this matter but I should think that Microsoft will try hard to maintain their share of the market just as others will try hard to gain a share so ultimately it will be up to what the consumers believe.

    Regards, OssieMac

    Sunday, May 3, 2015 8:48 PM
  • Just a general question... what do you think about the future of MS Excel (I am a BIG fan of Excel just FYI) or Powerview/Powerpivot as we see lot of new BI solutions in the market these days and the requirement for Big data.

    I'm pretty confident the future of Excel is very secure. Excel's self service BI solutions bring BI to (relatively) ordinary users and are only likely to improve, I suspect currently only a small % of users know about it. Also, despite occasional rumours to the contrary, VBA is not going away anytime soon!
    Sunday, May 3, 2015 9:13 PM
    Moderator
  • Thanks Peter
    Monday, May 4, 2015 11:35 AM