LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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??
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When I try to change formatting Excel stop working and closes out Mineeng Excel Discussion (Misc queries) 0 September 21st 09 04:16 PM
Password prompt when opening Excel within IE brianw Excel Discussion (Misc queries) 0 July 10th 06 08:39 PM
Password Prompt Noel Excel Discussion (Misc queries) 0 May 18th 05 07:42 PM
Password Prompt for VBA Project Appears After Excel Quits LAF[_6_] Excel Programming 8 April 23rd 05 11:26 PM
Excel 2003 when closing Excel after having opened a project locked for viewing.. password prompt??? braindead Excel Discussion (Misc queries) 0 March 25th 05 01:58 PM


All times are GMT +1. The time now is 06:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"