Results 1 to 9 of 9
  1. #1
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Christchurch, Canterbury
    Posts
    121
    Thanks
    8
    Thanked 0 Times in 0 Posts

    VBA password box on exiting Excel (in 2007)

    If you run our VBA macros - no problem. If you close the workbook then Excel - no problem. But if you run the macro then exit Excel without closing the workbook the user is prompted for the VBA password (2 or 4 times)

    Users won't take "well close the workbook first - or just click cancel" as a solution. Unpassword protecting the code also isn't an option.

    I've looked through the code and can't see any problems - or rather I've fixed forms that weren't unloaded and objects left lying about.

    I cannot reproduce at home - but I run Windows XP rather than Windows 7 and (probably the most important) I don't have any extra VBA code from third parties loaded. However, it is our project that is named in the password box.

    I also think this is new to 2007 - but I think the Third Party stuff has been updated as well.

    Any ideas how I can track down what is causing the problem?

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    5,910
    Thanks
    0
    Thanked 89 Times in 85 Posts
    Do you have any COM addins running? They are usually the real culprit for this (Google Desktop use to be a common cause).
    Regards,
    Rory
    Microsoft MVP - Excel.

  3. #3
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Christchurch, Canterbury
    Posts
    121
    Thanks
    8
    Thanked 0 Times in 0 Posts
    How do I heck which COM Addins are running? Can they be turned off one at a time?

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    5,910
    Thanks
    0
    Thanked 89 Times in 85 Posts
    In the AddIns dialog in Options, there is an option in the Manage Addins combo to view COM Addins. (I can't recall offhand if this now shows COM addins that have been installed for all users; it never used to)
    Regards,
    Rory
    Microsoft MVP - Excel.

  5. #5
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Christchurch, Canterbury
    Posts
    121
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Thanks that was it. Unfortunately, the AddIn is ProjectWise - which is not optional :-(

  6. #6
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    5,910
    Thanks
    0
    Thanked 89 Times in 85 Posts
    I'd check with the supplier then as it appears to be an issue with their coding (though they are not alone here)
    Regards,
    Rory
    Microsoft MVP - Excel.

  7. #7
    New Lounger
    Join Date
    Sep 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The problem is caused by Google Desktop 99% of the time. It incorrectly sets a registry entry. The fast way to close the password prompt box is to press the ESC key many times, as rapidly as you can.

    The long term fix is to fix the registry.

    Bob Flanagan
    Last edited by Medico; 2012-10-09 at 17:06.

  8. #8
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Christchurch, Canterbury
    Posts
    121
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Thanks Bob.

  9. #9
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,379
    Thanks
    207
    Thanked 829 Times in 762 Posts
    Judith,

    You can also trap the Big Red X and then run your code to close the macro and close Excel. Here's a PDF of a MS article on the subject.
    Attached Files Attached Files
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


Tags for this Thread

Posting Permissions

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