Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default automatically unprotect vba-project

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default automatically unprotect vba-project


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" wrote in message
...
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
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
protect / unprotect VBA project by macro sylvain Excel Discussion (Misc queries) 0 July 31st 06 06:09 PM
Can project unprotect self? [email protected] Excel Programming 1 May 3rd 06 08:51 AM
protect/unprotect a VBA Project mangesh_yadav[_213_] Excel Programming 6 May 27th 05 01:30 AM
protect/unprotect a VBA Project helmekki[_57_] Excel Programming 0 May 25th 05 12:56 PM
Protect\Unprotect VBA project Rohit Thomas Excel Programming 2 August 28th 03 04:16 PM


All times are GMT +1. The time now is 10:42 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"