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.
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.
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?
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.