I have built VB code that refers to a cell on a sheet for the password to protect the sheet. I now need to protect the VB code and would like to use the same cell reference for the password - that way the password only needs to be changed in one place (rather than using the properties>protection dialog box for the VB project). Is there any way to protect the VB project/code using VB code?
Excel doesn't share any mechanized way to do this with developers. The closest thing I've seen is to use Sendkeys to traverse the dialogs. But I wouldn't rely on that ever. Brian wrote: > > I have built VB code that refers to a cell on a sheet for the password to > protect the sheet. > > I now need to protect the VB code and would like to use the same cell > reference for the password - that way the password only needs to be changed > in one place (rather than using the properties>protection dialog box for the > VB project). > > Is there any way to protect the VB project/code using VB code? -- Dave Peterson