Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unlocking VBA project in Excel
Hello,
I have one password protected vba project in my excel file. I want to unlock this vba project through C# code. Could anyone help me on this? I tried the sendKey function of C# but still not able to get through. Here's the code that I have used: if(Workbook.VbProject.Protection== Microsoft.Vbe.Interlop.vbext_ProjectProtection.vbe xt_pp_locked) { Workbook.Activate(); WorkBook.Application.OnKey("%{F11}",Type.Missing); SendKeys.Send("%F11%TE" + Pwd + "~~"); } Pwd is the variable containing the password to unlock the vbaproject. Regards, Ramo |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Programatically Unlocking a Project in the VBIDE | Excel Programming | |||
Unlocking a Project | Excel Programming | |||
Locking and unlocking a Excel project for viewing | Excel Programming | |||
Locking/Unlocking a VBA Project in 2000 vs '97 - Difference? | Excel Programming | |||
unlocking a project in VB(A) | Excel Programming |