is there a way to protect the userform fields or the userform as whole from other people entering date accept the person who has been given the privilege to enter data?
Thanks
is there a way to protect the userform fields or the userform as whole from other people entering date accept the person who has been given the privilege to enter data?
Thanks
You could place code in the userform_initialize event to ask for a password before displaying the form.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
do you know where I can get this code?
Putting this in the code module for the UserForm should work. The declaration of the module wide variable should be the first thing in the module.Please Login or Register to view this content.
when I put the code you provided it does not work. I am not sure I put it in the worng place. if I put the wrong password the form is not unloading it pop up again.
Thanks
Please Login or Register to view this content.
I didn't see the declaration of accessForbidden in your post. I assume it was out of frame when you copied the code from the module.
But the main problem seemed to be integrating my _Activate routine with yours. I'd try this.
Please Login or Register to view this content.
Here is the full code just in case I missed up somewhere.
Thanks
I'm not sure if this will work right. I'm on a Mac and your ActiveX controls don't work for me. The modifications I made to your UserForm code work, but I'm not sure if the reflected (you getting my copy of the downloaded file) ActiveX controls will work.
There were two things I modified.
1) The declaration of accessForbidden as a variable was moved from inside the _Initialize routine to outside all subs. (i.e. declared as a module wide variable)
2) I put the If...Else...End If structure above into the _Activate routine.
Also, I noticed that you changed the prompt for password, but not the password.
It worked thanks. One more questions is it possible to add more than one password for login?
Sure.
Please Login or Register to view this content.
How come when I change the word friend and other password the I get the the password is wrong message? Are these the only password I can use?
Thanks
How do you change it? Post the code.
Please Login or Register to view this content.
it does not work I put BUDDY or buddy or any of the other words still getting the password is wrong and I get the bye message.
Thanks
HummmOriginally Posted by walid66
OrPlease Login or Register to view this content.
Please Login or Register to view this content.
when I put the correct password it works fine but when I put the wrong pass it work the form still pops up it is not hiding. see code below.
Thanks
Please Login or Register to view this content.
try
Delete Sub UserForm_Activate() code
Please Login or Register to view this content.
Last edited by jindon; 11-11-2007 at 03:57 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks