Hey,
I have a small database where i want some of my employees to add information. Some of these are just not that smooth with computers in general so i want to protect my database in some kind.
So my solution was that i do a modal form so they cant click on things around it but its still possible to "close" it down. I want the close button there for my use. what would be nice was if i could protect the close button in some way so that they cant close the form down whenever they please or missclick.
Is there some way to passwordprotect the "close" button.
Or would there be some better way to make the form so its no possible to get inside the database itself?
Last edited by Zheno; 02-22-2011 at 04:00 PM.
You can use code to prevent the user closing the form with the red X, then add a button that requires a password before closing.
This will probably cause problems closing the workbook. The simplest solution is to make the data sheet very hiddenPrivate Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then Cancel = True MsgBox "You can't close the form like this! Please use the buttons on the form" End If End Sub
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Thanks for the help royUK,
I went the simple road tho. Took away the possibility too close down the form with the "X" and added a button, put it to the smallest possible, and transparent and put it in the down left corner. and ofcourse put a "close" macro in it.
Anyway thanks for the help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks