![]() |
Unprotect VBAProjects using VBA
I have a few different Excel-documents that I want to update automatically trough another Excel-document. They all have the VBAProjects protected and I need to replace several modules in each one of them. How do I unlock them, I have the correct password. I have read another thread but I can not make it work. http://www.excelforum.com/t120946-s Do anyone know have to make it work? Thanks. /Marcus ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Unprotect VBAProjects using VBA
you can send you file to me .I will help you to open it,have a good time
"Marcus[Sweden]" 写入消息新闻 ... I have a few different Excel-documents that I want to update automatically trough another Excel-document. They all have the VBAProjects protected and I need to replace several modules in each one of them. How do I unlock them, I have the correct password. I have read another thread but I can not make it work. http://www.excelforum.com/t120946-s Do anyone know have to make it work? Thanks. /Marcus ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Unprotect VBAProjects using VBA
Sub UnPrtct()
UnprotectVBProject Workbooks("UnProtectProject.xls"), "123" End Sub Sub UnprotectVBProject(wb As Workbook, Pwd As String) Set Application.VBE.ActiveVBProject = wb.VBProject SendKeys "~" & Pwd & "~" 'keep the leading and trailing ~ characters -- these represent the ENTER key End Sub I have a few different Excel-documents that I want to update automatically trough another Excel-document. They all have the VBAProjects protected and I need to replace several modules in each one of them. How do I unlock them, I have the correct password. I have read another thread but I can not make it work. http://www.excelforum.com/t120946-s Do anyone know have to make it work? Thanks. /Marcus ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Unprotect VBAProjects using VBA
I cant get this to work. The code should be in the dokument you are updating from, or? I'm running XP, could that be any problem? Thanks. /Marcus ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 12:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com