VBA Custom Ribbon Tab Buttons

decadence

Well-known Member
Joined
Oct 9, 2015
Messages
525
Office Version
  1. 365
  2. 2016
  3. 2013
  4. 2010
  5. 2007
Platform
  1. Windows
Hi, I have a button that can log a user in via their windows user and password but what I would like to do is disable all buttons except the login button if the incorrect user/password is entered, If User enters correct info then enable all buttons. is this possible through vba?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
This is dual layers security right, ermm nope

the domain will be user log tied to the AD and so they device is authenticated by the organisation grating user access to their controlled rights and classes, correct !

This method you mention means that user are using others first log in, thus the requiring for dual layer securing ie in this case Excel file

Trouble is ................. IG will freak as the device is open at AN.Other user and no organisation will allow that, think carefully is my advice loads of lawful access issues here and GDPR is massive right now

Get the Excel file on a generic share safe store repository, and have each user log in and access the files normally then theres no other security required only users with rights to that repository can see/open the file. Save you loads of agro all arround
 
Upvote 0
Hi Jack, I have made an input box for user name and if it matches their logon user name then the password input box will show and will have to match their logon password but I have added code so the password that is being input is starred so no one can see what is being entered. If the input boxes don't match the login user then it won't work.

There is also 3 login attempts and if failed 3 times the workbook and worksheets get protected and saved and Close excel. Only specific users can unprotect the book and sheets then unhide the sheets. If the password is correct then the book and sheet will be unhidden. There is no stored passwords in any books, sheets or files.

The reason for the first post is so I can disable the login button but also enable all buttons if correct user and password
 
Last edited:
Upvote 0
decadence Ok i get what your doing

so the user list and Passwords are stored where? Excel will struggle to pull them back from AD and you will need to know all of these details

ie Jack logs in fails as expected you log in then it works all good so far

Now hows it cross checked to the correct user name and password, yes from Win Sys.x you can get the user log in pretty easy for that log in only, so I get maybe a generic Win log in is being used / or AN.Other log in .. the passwords are checked how?
 
Upvote 0
The User and Password are not stored anywhere, The User and Password must be the same as the windows login. The code checks to see if this matches If it does then the user can access the document, If the user doesn't match i.e if John Doe is logged in windows but Jane Doe tries using her credentials then it won't match and will lock the document after 3 attempts.
Basically for Jane Doe to be able to access the document with her credentials she has to be logged in under her Windows Login
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,113,998
Members
448,541
Latest member
iparraguirre89

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