PC Review


Reply
Thread Tools Rate Thread

automatically unprotect vba-project

 
 
Berkan
Guest
Posts: n/a
 
      7th Jun 2010
Hi,

is it possible to unprotect a password-protected excel-addin by code or does
the user needs to enter it allways manually? neither the unprotect method of
the coressponding workbook object nor the password-parameter of the "open"
function seems to do what I need :-(

kind regards
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      7th Jun 2010

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

"Berkan" <(E-Mail Removed)> wrote in message
news:F2896486-2E29-4BE9-A4D5-(E-Mail Removed)...
> Hi,
>
> is it possible to unprotect a password-protected excel-addin by code or
> does
> the user needs to enter it allways manually? neither the unprotect method
> of
> the coressponding workbook object nor the password-parameter of the "open"
> function seems to do what I need :-(
>
> kind regards



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can project unprotect self? aaronfude@gmail.com Microsoft Excel Programming 1 3rd May 2006 08:51 AM
Re: protect/unprotect a VBA Project mangesh_yadav Microsoft Excel Programming 6 27th May 2005 01:30 AM
protect/unprotect a VBA Project helmekki Microsoft Excel Programming 0 25th May 2005 12:56 PM
How can I unprotect an Access project? =?Utf-8?B?SG93IGNhbiBJIG1vZGlmeSBteSBkYXRhYmFzZQ== Microsoft Access 2 20th Nov 2004 09:24 PM
Protect\Unprotect VBA project Rohit Thomas Microsoft Excel Programming 2 28th Aug 2003 04:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:31 PM.