I want to design VBA code that protects excel document with password.
I know its possible with excel tools and its more secure, but I want to try this and use it in other projects.
I wrote this code
vPass = InputBox("Password : ")
If StrComp(vPass, "predefinedPass") <> 0 Then Application.Quit
But when I put it in Workbook_Open, the content of the file is still showing while while waiting for user to give password.
I don't want the content of file to be shown.
Any ideas??