![]() |
Import module in protected project?
Chip Pearson wrote: Rob, For the Unprotect operation a much simpler way is simply use code like the following: Sub UnprotectVBProject(WB As Workbook) Set Application.VBE.ActiveProject = WB.VBProject In Excel 10.0, this above does not select the project of an XLA addin in the Projects window. Tried by running the UnprotectVBProject sub routine from within VBE and also from excel Run macro dialog box but to no avail. Also the Application.VBE.ActiveProject help file indicates that this is now a readonly property. So, Microsoft now seems to have permanently fixed the unlocking of VBE Projects via VBA! Right? SendKeys "~PASSWORD~" End Sub Of course, change "PASSWORD" to the actual password for the project (but keep the leading and trailing ~ characters -- these represent the ENTER key). -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com |
All times are GMT +1. The time now is 12:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com