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.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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:
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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
Back
Top