View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Unlock Protected VBAProject via code

I can't say for sure, Net is a new world for me, but I cannot see how it
would be.

Maybe you could iterate through the projects in the VBIDE, sort them, and
then work out where in the list the target project is.

--
__________________________________
HTH

Bob

"ExcelMonkey" wrote in message
...
One last question Bob. Would this be any easiser using VB (.Net)? Or is
this irrelevant as there is not any exposure to the Object model period?

Thanks

EM

"Bob Phillips" wrote:

You would still need to know the password, it is not a cracking method

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

"Charlotte E." wrote in message
...
Is there a way to unlock a VBAProject via code other than using the
SendKey
method?

How to do that with SendKey???