VBA userform login to open excel using domain username and password

Globaltechpharm

New Member
Joined
Oct 30, 2018
Messages
6
Hello friends,

I need the code for VBA userform login to open excel using domain username and password.

So, when user open a file, userform will be activated and user need to enter username and password, domain name will be automatically detected and written in 3rd line. But if user need to enter other domain, he can enter in text box.

After that, when user clicks on command button to login, excel will verify domain username and password and if is correct then only userform will be closed. And user can do work in excel.

Such entry of login should be tracked on another worksheet "audit trail".

Hope that you understood my query.

Thanks for readin. Thank you in advance.
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Kamolga

Well-known Member
Joined
Jan 28, 2015
Messages
1,176
You should block the folder in your domain to certain users and use track change.

What I mean is that simply pressing shift while the file opens will bypass the userform and get anyone in the file

In addition getting excel to check userform/domain passwords is I believe a serious threat to your domain (i think I would find a way to print all usernames with password if I was a user).
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,122,581
Messages
5,597,018
Members
414,116
Latest member
sfullnet

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top