Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
MikeFullam
 
Posts: n/a
Default VBA password protected modules

Is there any way I can unlock a password protected macro so I can update it
using VBA? Obviously I know what the password is, but the file has been
distributed around the Group and it would be more convenient for the users to
have this updated rather than reissued
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default VBA password protected modules

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 Phillips

(remove nothere from email address if mailing direct)

"MikeFullam" wrote in message
...
Is there any way I can unlock a password protected macro so I can update

it
using VBA? Obviously I know what the password is, but the file has been
distributed around the Group and it would be more convenient for the users

to
have this updated rather than reissued



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 Workbook vs Worksheet?? Dan B Excel Worksheet Functions 3 November 7th 05 09:02 PM
insert password protected spreadsheet RZT27Y Excel Discussion (Misc queries) 1 September 30th 05 10:57 PM
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. Daniel Excel Worksheet Functions 0 June 23rd 05 11:56 PM
Linking to a Password Protected Document in Excel 2000 Andrew Excel Discussion (Misc queries) 2 February 15th 05 01:06 AM
bypass password when update linking of password protected file Yan Excel Discussion (Misc queries) 1 February 7th 05 11:29 PM


All times are GMT +1. The time now is 07:35 AM.

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"