+ Reply to Thread
Results 1 to 8 of 8

Stop prompt for password when Excel closes

  1. #1
    ZagrebMike
    Guest

    Stop prompt for password when Excel closes

    This relates to Excel 2003 VBA

    I would like to protect the code associated with a workbook by assigning a
    password in the Project Properties dialog (Protection tab) to prevent users
    viewing or changing the code. However, once I give it a password, when the
    user closes the workbook, he is prompted for the password.

    To try and isolate the problem, I've set up a simple spreadsheet,
    FormTest.xls, which contains a single Show Form button that shows a form
    (TestForm). The form has an OK button which hides the form. That's all.

    I see the following behaviour …

    1. Open the FormTest.xls spreadsheet (enable macros if necessary)
    2. Click the Show Form button
    3. In the TestForm form that is displayed, press OK (the form is removed)
    4. Close the workbook
    5. Excel closes, but then …
    6. A dialog appears asking for the FormTest password – WHY?

    The only code is:
    For the Show Form button on the worksheet:
    Private Sub ShowFormButton_Click()
    TestForm.Show
    End Sub

    For the TestForm form:
    Private Sub OKButton_Click()
    TestForm.Hide
    End Sub

    I have tried unloading the form when the workbook is closed but that seems
    to have no effect.

    If the code is not password protected, then it all works fine.

    Any ideas??

  2. #2
    Dave Peterson
    Guest

    Re: Stop prompt for password when Excel closes

    Do you use Google Desktop?

    If you do, this was posted recently:

    From: "Jeff" <[email protected]> - Find messages by this author
    Date: Sat, 18 Dec 2004 06:07:50 -0800
    Local: Sat, Dec 18 2004 6:07 am
    Subject: Re: VBAProject Password error window from Excel


    A solution for at least some of the Google Desktop Search program and
    associated VBE issues (the duplicate VBA projects in VBE) has been
    found - perhaps that could help with this issue, too - check this post
    I started at Experts Exchange (solution excerpted below):


    http://www.experts-exchange.com/Appl...Excel/Q_211917...

    "You are not going to believe this one (I didn't anyway).

    The culprit is the registry key

    HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\Office.Desktop.Google.com\LoadBehavior
    It was set to 3. I set it to 2 and all is well.

    ZagrebMike wrote:
    >
    > This relates to Excel 2003 VBA
    >
    > I would like to protect the code associated with a workbook by assigning a
    > password in the Project Properties dialog (Protection tab) to prevent users
    > viewing or changing the code. However, once I give it a password, when the
    > user closes the workbook, he is prompted for the password.
    >
    > To try and isolate the problem, I've set up a simple spreadsheet,
    > FormTest.xls, which contains a single Show Form button that shows a form
    > (TestForm). The form has an OK button which hides the form. That's all.
    >
    > I see the following behaviour …
    >
    > 1. Open the FormTest.xls spreadsheet (enable macros if necessary)
    > 2. Click the Show Form button
    > 3. In the TestForm form that is displayed, press OK (the form is removed)
    > 4. Close the workbook
    > 5. Excel closes, but then …
    > 6. A dialog appears asking for the FormTest password – WHY?
    >
    > The only code is:
    > For the Show Form button on the worksheet:
    > Private Sub ShowFormButton_Click()
    > TestForm.Show
    > End Sub
    >
    > For the TestForm form:
    > Private Sub OKButton_Click()
    > TestForm.Hide
    > End Sub
    >
    > I have tried unloading the form when the workbook is closed but that seems
    > to have no effect.
    >
    > If the code is not password protected, then it all works fine.
    >
    > Any ideas??


    --

    Dave Peterson

  3. #3
    Peter Huang [MSFT]
    Guest

    RE: Stop prompt for password when Excel closes

    Hi

    Based on my test, I can not reproduce the problem.
    To isolate the poblem, I think you may try to show a msgbox in the ShowForm
    Button or even just debug.print "test" to see if the problem persists.
    Also I think you may try to create a new workbook on another machine to see
    if the problem persists. This will help us to know if the problem is
    workbook specific or machine specific.

    If you still have any concern please feel free to post here.

    Best regards,

    Perter Huang
    Microsoft Online Partner Support

    Get Secure! - www.microsoft.com/security
    This posting is provided "AS IS" with no warranties, and confers no rights.


  4. #4
    ZagrebMike
    Guest

    Re: Stop prompt for password when Excel closes

    That does seem to be the problem, thanks. I *have* recently installed Google
    Desktop. When I changed the value of
    HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\Office.Desktop.Google.com to 2 the problem goes away.

    But ... does anyone know what the consequences of changing the value of this
    key is?

    "Dave Peterson" wrote:

    > Do you use Google Desktop?
    >
    > If you do, this was posted recently:
    >
    > From: "Jeff" <[email protected]> - Find messages by this author
    > Date: Sat, 18 Dec 2004 06:07:50 -0800
    > Local: Sat, Dec 18 2004 6:07 am
    > Subject: Re: VBAProject Password error window from Excel
    >
    >
    > A solution for at least some of the Google Desktop Search program and
    > associated VBE issues (the duplicate VBA projects in VBE) has been
    > found - perhaps that could help with this issue, too - check this post
    > I started at Experts Exchange (solution excerpted below):
    >
    >
    > http://www.experts-exchange.com/Appl...Excel/Q_211917...
    >
    > "You are not going to believe this one (I didn't anyway).
    >
    > The culprit is the registry key
    >
    > HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\Office.Desktop.Google.com\LoadBehavior
    > It was set to 3. I set it to 2 and all is well.
    >
    > ZagrebMike wrote:
    > >
    > > This relates to Excel 2003 VBA
    > >
    > > I would like to protect the code associated with a workbook by assigning a
    > > password in the Project Properties dialog (Protection tab) to prevent users
    > > viewing or changing the code. However, once I give it a password, when the
    > > user closes the workbook, he is prompted for the password.
    > >
    > > To try and isolate the problem, I've set up a simple spreadsheet,
    > > FormTest.xls, which contains a single Show Form button that shows a form
    > > (TestForm). The form has an OK button which hides the form. That's all.
    > >
    > > I see the following behaviour …
    > >
    > > 1. Open the FormTest.xls spreadsheet (enable macros if necessary)
    > > 2. Click the Show Form button
    > > 3. In the TestForm form that is displayed, press OK (the form is removed)
    > > 4. Close the workbook
    > > 5. Excel closes, but then …
    > > 6. A dialog appears asking for the FormTest password – WHY?
    > >
    > > The only code is:
    > > For the Show Form button on the worksheet:
    > > Private Sub ShowFormButton_Click()
    > > TestForm.Show
    > > End Sub
    > >
    > > For the TestForm form:
    > > Private Sub OKButton_Click()
    > > TestForm.Hide
    > > End Sub
    > >
    > > I have tried unloading the form when the workbook is closed but that seems
    > > to have no effect.
    > >
    > > If the code is not password protected, then it all works fine.
    > >
    > > Any ideas??

    >
    > --
    >
    > Dave Peterson
    >


  5. #5
    ZagrebMike
    Guest

    Re: Stop prompt for password when Excel closes

    Attached is a small spreadsheet that illustrates the problem. As Dave has
    pointed out, it seems to be the setting of
    HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\Office.Desktop.Google.com
    which causes it.

    ""Peter Huang" [MSFT]" <[email protected]> wrote in message
    news:[email protected]...
    > Hi
    >
    > Based on my test, I can not reproduce the problem.
    > To isolate the poblem, I think you may try to show a msgbox in the
    > ShowForm
    > Button or even just debug.print "test" to see if the problem persists.
    > Also I think you may try to create a new workbook on another machine to
    > see
    > if the problem persists. This will help us to know if the problem is
    > workbook specific or machine specific.
    >
    > If you still have any concern please feel free to post here.
    >
    > Best regards,
    >
    > Perter Huang
    > Microsoft Online Partner Support
    >
    > Get Secure! - www.microsoft.com/security
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >






  6. #6
    Jim Rech
    Guest

    Re: Stop prompt for password when Excel closes

    It makes the Google COM add-in "available but not loaded". The COM add-in
    handling UI is not visible by default in Excel but if you want to see it,
    you have to customize your commandbars like this:

    -View, Toolbars, Customize
    -Click the Commands tab
    -Click Tools in the Categories list
    -In the Commands list find "COM Add-ins" about half way down
    -Click on it and then Drag it up to the Tools menu.
    -When the Tools menu opens (automatically) continue dragging
    down to below "Add-ins" and release. (At least that's where I put it).
    -Close the Customize dialog

    --
    Jim Rech
    Excel MVP
    "ZagrebMike" <[email protected]> wrote in message
    news:[email protected]...
    | That does seem to be the problem, thanks. I *have* recently installed
    Google
    | Desktop. When I changed the value of
    |
    HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\Office.Desktop.Google.com
    to 2 the problem goes away.
    |
    | But ... does anyone know what the consequences of changing the value of
    this
    | key is?
    |
    | "Dave Peterson" wrote:
    |
    | > Do you use Google Desktop?
    | >
    | > If you do, this was posted recently:
    | >
    | > From: "Jeff" <[email protected]> - Find messages by this
    author
    | > Date: Sat, 18 Dec 2004 06:07:50 -0800
    | > Local: Sat, Dec 18 2004 6:07 am
    | > Subject: Re: VBAProject Password error window from Excel
    | >
    | >
    | > A solution for at least some of the Google Desktop Search program and
    | > associated VBE issues (the duplicate VBA projects in VBE) has been
    | > found - perhaps that could help with this issue, too - check this post
    | > I started at Experts Exchange (solution excerpted below):
    | >
    | >
    | > http://www.experts-exchange.com/Appl...Excel/Q_211917...
    | >
    | > "You are not going to believe this one (I didn't anyway).
    | >
    | > The culprit is the registry key
    | >
    | >
    HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\Office.Desktop.Google.com\LoadBehavior
    | > It was set to 3. I set it to 2 and all is well.
    | >
    | > ZagrebMike wrote:
    | > >
    | > > This relates to Excel 2003 VBA
    | > >
    | > > I would like to protect the code associated with a workbook by
    assigning a
    | > > password in the Project Properties dialog (Protection tab) to prevent
    users
    | > > viewing or changing the code. However, once I give it a password,
    when the
    | > > user closes the workbook, he is prompted for the password.
    | > >
    | > > To try and isolate the problem, I've set up a simple spreadsheet,
    | > > FormTest.xls, which contains a single Show Form button that shows a
    form
    | > > (TestForm). The form has an OK button which hides the form. That's
    all.
    | > >
    | > > I see the following behaviour â?¦
    | > >
    | > > 1. Open the FormTest.xls spreadsheet (enable macros if necessary)
    | > > 2. Click the Show Form button
    | > > 3. In the TestForm form that is displayed, press OK (the form is
    removed)
    | > > 4. Close the workbook
    | > > 5. Excel closes, but then â?¦
    | > > 6. A dialog appears asking for the FormTest password â?" WHY?
    | > >
    | > > The only code is:
    | > > For the Show Form button on the worksheet:
    | > > Private Sub ShowFormButton_Click()
    | > > TestForm.Show
    | > > End Sub
    | > >
    | > > For the TestForm form:
    | > > Private Sub OKButton_Click()
    | > > TestForm.Hide
    | > > End Sub
    | > >
    | > > I have tried unloading the form when the workbook is closed but that
    seems
    | > > to have no effect.
    | > >
    | > > If the code is not password protected, then it all works fine.
    | > >
    | > > Any ideas??
    | >
    | > --
    | >
    | > Dave Peterson
    | >



  7. #7
    Peter Huang [MSFT]
    Guest

    Re: Stop prompt for password when Excel closes

    Hi

    Thanks for your reply and thanks for Dave's experience sharing in the
    community.
    As you said, it seems that the problem is machine specific, as I can not
    reproduce the problem at my side with your attachment.
    I assume Dave's suggestion has helped you to resolve the problem.
    If you still have any concern, please feel free to post here.

    Best regards,

    Perter Huang
    Microsoft Online Partner Support

    Get Secure! - www.microsoft.com/security
    This posting is provided "AS IS" with no warranties, and confers no rights.


  8. #8
    Jeff Lefebvre
    Guest

    Re: Stop prompt for password when Excel closes

    Jim,

    I'm having the same "prompt for password" problem when i exit excel from a
    custom addin.

    I don't have google desktop installed.

    Any other ideas?

    Jeff Lefebvre


    "Jim Rech" wrote:

    > It makes the Google COM add-in "available but not loaded". The COM add-in
    > handling UI is not visible by default in Excel but if you want to see it,
    > you have to customize your commandbars like this:
    >
    > -View, Toolbars, Customize
    > -Click the Commands tab
    > -Click Tools in the Categories list
    > -In the Commands list find "COM Add-ins" about half way down
    > -Click on it and then Drag it up to the Tools menu.
    > -When the Tools menu opens (automatically) continue dragging
    > down to below "Add-ins" and release. (At least that's where I put it).
    > -Close the Customize dialog
    >
    > --
    > Jim Rech
    > Excel MVP
    > "ZagrebMike" <[email protected]> wrote in message
    > news:[email protected]...
    > | That does seem to be the problem, thanks. I *have* recently installed
    > Google
    > | Desktop. When I changed the value of
    > |
    > HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\Office.Desktop.Google.com
    > to 2 the problem goes away.
    > |
    > | But ... does anyone know what the consequences of changing the value of
    > this
    > | key is?
    > |
    > | "Dave Peterson" wrote:
    > |
    > | > Do you use Google Desktop?
    > | >
    > | > If you do, this was posted recently:
    > | >
    > | > From: "Jeff" <[email protected]> - Find messages by this
    > author
    > | > Date: Sat, 18 Dec 2004 06:07:50 -0800
    > | > Local: Sat, Dec 18 2004 6:07 am
    > | > Subject: Re: VBAProject Password error window from Excel
    > | >
    > | >
    > | > A solution for at least some of the Google Desktop Search program and
    > | > associated VBE issues (the duplicate VBA projects in VBE) has been
    > | > found - perhaps that could help with this issue, too - check this post
    > | > I started at Experts Exchange (solution excerpted below):
    > | >
    > | >
    > | > http://www.experts-exchange.com/Appl...Excel/Q_211917...
    > | >
    > | > "You are not going to believe this one (I didn't anyway).
    > | >
    > | > The culprit is the registry key
    > | >
    > | >
    > HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\Office.Desktop.Google.com\LoadBehavior
    > | > It was set to 3. I set it to 2 and all is well.
    > | >
    > | > ZagrebMike wrote:
    > | > >
    > | > > This relates to Excel 2003 VBA
    > | > >
    > | > > I would like to protect the code associated with a workbook by
    > assigning a
    > | > > password in the Project Properties dialog (Protection tab) to prevent
    > users
    > | > > viewing or changing the code. However, once I give it a password,
    > when the
    > | > > user closes the workbook, he is prompted for the password.
    > | > >
    > | > > To try and isolate the problem, I've set up a simple spreadsheet,
    > | > > FormTest.xls, which contains a single Show Form button that shows a
    > form
    > | > > (TestForm). The form has an OK button which hides the form. That's
    > all.
    > | > >
    > | > > I see the following behaviour â?¦
    > | > >
    > | > > 1. Open the FormTest.xls spreadsheet (enable macros if necessary)
    > | > > 2. Click the Show Form button
    > | > > 3. In the TestForm form that is displayed, press OK (the form is
    > removed)
    > | > > 4. Close the workbook
    > | > > 5. Excel closes, but then â?¦
    > | > > 6. A dialog appears asking for the FormTest password â?" WHY?
    > | > >
    > | > > The only code is:
    > | > > For the Show Form button on the worksheet:
    > | > > Private Sub ShowFormButton_Click()
    > | > > TestForm.Show
    > | > > End Sub
    > | > >
    > | > > For the TestForm form:
    > | > > Private Sub OKButton_Click()
    > | > > TestForm.Hide
    > | > > End Sub
    > | > >
    > | > > I have tried unloading the form when the workbook is closed but that
    > seems
    > | > > to have no effect.
    > | > >
    > | > > If the code is not password protected, then it all works fine.
    > | > >
    > | > > Any ideas??
    > | >
    > | > --
    > | >
    > | > Dave Peterson
    > | >
    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1