Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default VBA password removal - how many tabs?

I have found ths code listed below which gives a method of using sendkeys to
unlock a password protected project. I contains the line
..SendKeys "{TAB}", True ' Tab to locked project
If one has more than two workbooks open how can one be sure that enough tabs
have been performed?
Is there a way of reading the project name so that the code can compare it
with the workbook name?

Sub UnlockVBAProject()
' XL2000, Win2K
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" ' project password
.SendKeys "~", True ' Enter
End With
End Sub

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
Password removal? Bob Newman Excel Discussion (Misc queries) 5 January 28th 09 12:28 AM
Password Removal DaS Excel Discussion (Misc queries) 3 February 6th 08 07:04 PM
PASSWORD REMOVAL I have the password to open the file and the password to modify the file now how to remove them LJ[_4_] Excel Programming 0 April 27th 06 03:18 AM
Password removal leenanall Excel Programming 2 September 14th 05 08:06 PM
VBA Password Removal?? Buffyslay Excel Programming 3 February 15th 05 01:59 PM


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