(Destination As Long, Source As Long, ByVal Length As Long) Private Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" _ Private Const PAGE_EXECUTE_READWRITE = &H40 Open the file(s) that contain your locked VBA ProjectsĬreate a new xlsm file and store this code in Module1Ĭode credited to Siwtom (nick name), a Vietnamese developer Option Explicit.The code below swaps the memory of the original function used to display the password dialog with a user defined function that will always return 1 when being called.if this value is 1, the VBE will "think" that the password is right, hence the locked VBA project will be opened.After the dialog box is closed, the VBE checks the returned value of the system function. If user enters the wrong password or click Cancel, this function returns 0.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |