Require VBA code to user form with hidden sheet feauture

brightwayhr

New Member
Joined
Oct 5, 2016
Messages
10
Hi ,

The login form should have access to multiple admin and sub user, Where the admin can give access only to few sheets to there sub user for editing and other sheet has to be hidden.

I require VBA code.
 
Yeah Mike,

First I created a new workbook and saved as Macro format

Renamed the sheet1 As home
Sheet2 as user,3 as shared, 4 as Jane and 5th as Bob.

In home sheet I just typed the user name password as per above image.

Opened VBA editer and Top in this workbook pasted the code.

Inserted new module and pasted the code as above.

Created a userform.
Double click and created new 2 label and named as username and password.

Created a two text box for user name and password.
Then double clicked on userform and pasted the userform code.

After save when I opened am getting an error as run time error 424 object required as mentioned above. I don't see any userform to login And then debug it indicates in yellow colour as userform1.submitpassword.

These are the only step I followed.

Looking forward for u r response thank you for your support MiKe.
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
For some reason the profanity editor on this site takes exception to T a k e F o c u s O n C l i c k which is what that property should be (without the spaces).
 
Last edited:
Upvote 0
Useful one
When login through admin only Home, Users, and Shared is showing. Bob and Sheets are hidden even though the User sheet cells are empty under their name in the admin row. Any suggestions?
 
Upvote 0

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

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