Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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???






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unlock protected VBA equiangular Excel Programming 3 February 27th 07 09:44 AM
Check VBAproject is protected or not helmekki[_123_] Excel Programming 3 January 27th 06 11:33 PM
unlock and lock VBAProject Lenny_821[_4_] Excel Programming 0 November 6th 04 11:48 AM
unlock and lock VBAProject Lenny_821[_3_] Excel Programming 1 November 5th 04 11:36 PM
unlock and lock VBAProject Lenny_821[_2_] Excel Programming 2 November 5th 04 12:25 PM


All times are GMT +1. The time now is 10:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"