Consulting

Page 2 of 2 FirstFirst 1 2
Results 21 to 33 of 33

Thread: Project locked for viewing - SendKeys?

  1. #21
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Why would you need to modify it? The value is one. If you want to see what an object's constant values are, after you set the reference to this object, in the Immediate window type and press Enter key. This is like Debug.Print.
    ?vbext_pp_locked

  2. #22
    VBAX Tutor
    Joined
    Mar 2010
    Posts
    287
    Location
    Trying to reference that object produced an error. But changing it to <>1 fixed the problem.

  3. #23
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Hi Theta,

    I would bet that we probably all referenced VBIDE when writing/editing the code, and you may not have this library referenced.

    Mark

  4. #24
    VBAX Newbie
    Joined
    Feb 2011
    Posts
    3
    Location
    Quote Originally Posted by Kenneth Hobs
    Aflatoon's last code will dismiss the unlocked dialog.

    I added some missing API's and some constants. I also have a few extra API's but that does not really hurt anything unless you have a lots of other stuff going on that might exceed a stack limit. I tested it in xppro. It should be tested with UAC turned on. I suspect that it will still work ok since it does not use SendKeys().
    Unfortunately, under Win7 and Excel 2010 doesn' work. The properties window is not closed in my case...
    Furthermore, when I try to put the code through a loop in order to unlock various VBA projects (with known passwords) Excel crashes.... I suppose that probably the timer is the cause of my problem but I am not sure...

  5. #25
    VBAX Tutor
    Joined
    Mar 2010
    Posts
    287
    Location

    Question

    Quote Originally Posted by SamGr
    Unfortunately, under Win7 and Excel 2010 doesn' work. The properties window is not closed in my case...
    Furthermore, when I try to put the code through a loop in order to unlock various VBA projects (with known passwords) Excel crashes.... I suppose that probably the timer is the cause of my problem but I am not sure...
    I am running windows 7 with office 2010 and it works perfectly....

    Do you have all correct references set? Do you have the required DLL's on your machine?

  6. #26
    VBAX Newbie
    Joined
    Feb 2011
    Posts
    3
    Location
    Sorry, Theta, my mistake... The code from Excel VBA works fine...

    I actually have the following problem:
    The last few days I decided to organize all my VBA code. I had successfully written some code that loops through (an opened) workbook (that has VBA code) and gets some information about its procedures. Pearson's page helped me a lot.

    However, during the weekend I decided to go one step further:
    1) I have created a userform in which the user needs to select a folder (with workbooks).
    2) After selection, the codes loops through all files in the selected folder and creates a list in a new sheet (with workbooks names, paths etc.).
    3) Then the user enters some passwords in a textbox and populates a combobox. This is just to have a visual appearance of what passwords have been entered.
    4) Finally, the code loops through all excel files in the following way:
    a) Opens the workbook.
    b) Unprotects the VB project (if is protected) using the list of passwords of the combo box.
    c) Loops through VB project and get info about its procedures.
    d) Close the workbook and proceed to the next one.

    Having said that, my problem is 4b. Everything else works fine.
    I have spent a lot of hours the last 3 days and still I could not achieve this... I exclude of course the sendkeys method...
    The code I found here crashes my excel when I am trying to enter a wrong password.

    Any ideas?

  7. #27
    VBAX Newbie
    Joined
    Feb 2011
    Posts
    3
    Location
    I finally manage to finish this.
    Since this is only my 3rd post I cannot provide you the link with the application (it is in my blog).
    It is not perfect, but at least does what I wanted to do.

    Thank you all for your contribution and help!

  8. #28

    I know its closed thread, comment for other visitors

    I know its closed thread, comment for other visitors

    u may need "Select Case Application.LanguageSettings.LanguageID(msoLanguageIDUI) ..." in "ClosePropertiesWindow" Prosedure
    in my cased it didnt work ..

    ...
    and I need to set unlock VBAProject save. ex) uncheck "project Protect" checkbox, remove password String, click OK button.
    I am not good at using win32API .. someone solve this, please send email

  9. #29
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    If you're asking to bypass the password, you won't get help here - best try to get the password from the Creator.


    http://www.vbaexpress.com/forum/faq.php?faq=psting_faq_item#faq_hack_faq_item



    Can I ask hacking / cracking questions here?

    Requests for help or answers aiding in the pirating of intellectual property or involving hacking/cracking of password protection of document files or software programs is strictly prohibited on the site. We are all professionals here and, as a community, it is our decision to respect the intellectual and potentially confidential property of others.



    Please do not ask anyone to help with lost CD keys; you must contact the software supplier for this information.

    If you have the password, and want to use Sendkeys (which I don't think will work), it'd be better to start a new thread instead of tagging onto an 8 year old one
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  10. #30
    hi Paul_Hossler,

    I dont asking "hacking Tech". I have many .xlsm Files made by me. I am just manage my Files.
    Like to add moduleFiles etc..

  11. #31
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    The last time I checked, the ability to unlock a file required manually entering the PW for security reasons

    I don't think you can use SendKeys
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  12. #32
    Banned VBAX Regular
    Joined
    Feb 2020
    Posts
    8
    Location
    You'd better unlock them manually.

  13. #33
    Banned VBAX Regular
    Joined
    Feb 2020
    Posts
    8
    Location
    You'd better unlock them manually.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •