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
VBA and macro scripting
You cannot create macros with VBA in Excel for the web, but you can open and edit VBA-enabled spreadsheets without removing (or corrupting) the VBA contained in the file. Learn more about getting started with macros.
You could use this code with other versions.
Only if it is your own file, otherwise you could be liable to prosecution.
Hope I was able to help you.
Nikolino
I know I don't know anything (Socrates)
* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here
- amitmahapatraNov 03, 2020Copper ContributorHi.. I am looking for adding a password. I am not looking to remove.
If we can't use VBA, can you please help the piece of code that can be used to write a macro that can add a password to the excel.. A simple macro..