[VBA] Userform to show upon opening excel sheet, then use a password to log in.

LittleJon

New Member
Joined
Oct 14, 2018
Messages
18
Please could someone give me the code for opening up a userform upon opening an excel sheet. Userform is called MainUF1. Then i need to put in a username and password.

Any help would be appreciated.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I'm not sure what you mean by:
the userform would close.
Perhaps it would be best if you could explain in detail, step by step, what you want to happen when you open the workbook.
 
Upvote 0
When i open the workbook a userform would pop up. When i enter a username and password into that userform, it would close and allow me to use the workbook.
 
Upvote 0
If the name of the userform is MainUF1, then it should show on opening the workbook. Did you place the macro in the code module for ThisWorkbook as I described in Post #4 ? What are the names of the text boxes on the userform that will contain the username and password?
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,315
Members
452,634
Latest member
cpostell

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