VBA password protected modules

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way I can unlock a password protected macro so I can update it
using VBA? Obviously I know what the password is, but the file has been
distributed around the Group and it would be more convenient for the users to
have this updated rather than reissued
 
It can be done, but it involves the use of SendKeys which isn't too stable.

This is an example, but you may need to tune it

With Application
.SendKeys "%{F11}", True ' VBE
.SendKeys "^r", True ' Set focus to Explorer
.SendKeys "{TAB}", True ' Tab to locked project
.SendKeys "~", True ' Enter
.SendKeys "password"
.SendKeys "~", True ' Enter
End With


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Back
Top