Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asking user a password in VBA

Status
Not open for further replies.

RobV

Mechanical
Feb 25, 2003
27
I've just finish a complex workbook with macro's to streamline the calculation process and my boss has asked me to put it up on hte intranet. However only a restricted amount of user are 'allowed' to have access to the module so I programmed a VBA macro to check user ID. The next step is to program VBA to ask the user his passowrd for verification (and ofcourse masking the password when the user is typing)

Any idees ??

RobV
 
Replies continue below

Recommended for you

Why not just use the password protection of the workbook itself?

TTFN
 
Try Project / Add Form / Login Dialog
 
Sorry - my last post was assuming you were using Microsoft Visual Basic 6.0
 
You can create a form, add a textbox, and change the Textbox.PasswordChar property. If you enter an asterisk "*", you'll have the standard masked entry field.

DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
 
I would think there may be various ways of doing this.

You can display a userform on file open and ask for a password - if password matches with the stored one the file opens otherwise the file closes.

Or you can extract the username if you're working in WIN NT. You may wish to match the username with your stored usernames and grant access accordingly.

Samiran
 
Thanks all,

dsi's idee took me further. Even found MS solution in their knowlegde base with samples of userforms.

download file we1163.exe

Greet
RobV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor