Forum Discussion
amitmahapatra
Nov 03, 2020Copper Contributor
VBA code for password to open excel
Can anyone please help with a VBA code that can be used to ask for password when opening a Excel sheet? There can be a y no of sheets in the work book but none can be accessed if password is wrong.. ...
NikolinoDE
Nov 03, 2020Gold Contributor
Here is a sample file to insert the password.
Have you fished from the Internet before long time not had more the side. I have used this example a few times with good results. You can of course make it even better.
I hope to make some amends could 🙂
Hope I was able to help you.
Nikolino
I know I don't know anything (Socrates)
mtarler
Nov 03, 2020Silver Contributor
amitmahapatra similar to NikolinoDE I recommend showing a sheet upon opening but using that sheet to make sure the user knows that macros must be enabled and I would also put a button on that sheet to "Login". I would also recommend that you lock the macro project so people don't circumvent your macro/password.