* * * * I've made new discoveries but am not able to delete this original post. My question has therefore changed a little bit. Please ignore this post and read the first reply. Thanks! * * * *
The symptom: It keeps prompting for VBA Project Password even though I have supplied the correct password via Sendkeys.
After a lot of research on possibility of getting the VBA projects unlocked programmatically, I had to resort to SendKeys as a short-term/time-sensitive solution. I found some sample code online and have gotten it to work once, but it has stopped working since my 2nd test. I cannot figured out how I did differently the first time.
Given that I did not touch the keyboard or mouse after the procedure starts running, I was wondering if any part of the parent procedure calls that require user action could have messed up the Sendkeys. The User will click a command button on a Worksheet to browse and select an older version workbook to update. The entire process include some worksheet changes and eventually get to the part of unlocking and updating of VBA project on the old file. Could the Action of browsing/selecting the target file mess up the SendKeys value? Or is it the SendKeys not coded properly? I greatly appreciate if anybody can offer some pointers. Thanks!
Bookmarks