Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unlock Protected VBAProject via code
Is there a way to unlock a VBAProject via code other than using the SendKey
method? The reason I ask is that I have a large number of file to go through which have projected VBAProjects. The users are providing me with the passwords in advance. I simply want to automate the process Thanks EM |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unlock Protected VBAProject via code
Sendkeys is the only automated way that I know of.
-- __________________________________ HTH Bob "ExcelMonkey" wrote in message ... Is there a way to unlock a VBAProject via code other than using the SendKey method? The reason I ask is that I have a large number of file to go through which have projected VBAProjects. The users are providing me with the passwords in advance. I simply want to automate the process Thanks EM |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unlock Protected VBAProject via code
Thanks Bob
EM "Bob Phillips" wrote: Sendkeys is the only automated way that I know of. -- __________________________________ HTH Bob "ExcelMonkey" wrote in message ... Is there a way to unlock a VBAProject via code other than using the SendKey method? The reason I ask is that I have a large number of file to go through which have projected VBAProjects. The users are providing me with the passwords in advance. I simply want to automate the process Thanks EM |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unlock Protected VBAProject via code
Is there a way to unlock a VBAProject via code other than using the
SendKey method? How to do that with SendKey??? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unlock Protected VBAProject via code
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??? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unlock Protected VBAProject via code
Correct me if I am wrong Bob but isn't the issue with this method that you
really don't know (in advance) how many TABs you will have to press to navigate down the items in the Project window? It's obvious when you are looking at the Project window once teh IDE is open. I am assuming this is an issue as the items will be a function of all the Add-ins you have loaded in your Excel and the files you current have open on your computer. 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??? |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unlock Protected VBAProject via code
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??? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unlock Protected VBAProject via code
Yes, you are absolutely correct, which is why I said that it needs tuning.
It isn't failsafe, Sendkeys never is. Personally, I am lost as to why anyone needs this. -- __________________________________ HTH Bob "ExcelMonkey" wrote in message ... Correct me if I am wrong Bob but isn't the issue with this method that you really don't know (in advance) how many TABs you will have to press to navigate down the items in the Project window? It's obvious when you are looking at the Project window once teh IDE is open. I am assuming this is an issue as the items will be a function of all the Add-ins you have loaded in your Excel and the files you current have open on your computer. 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??? |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
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??? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unlock protected VBA | Excel Programming | |||
Check VBAproject is protected or not | Excel Programming | |||
unlock and lock VBAProject | Excel Programming | |||
unlock and lock VBAProject | Excel Programming | |||
unlock and lock VBAProject | Excel Programming |