0

I have a simple code that I am wondering if there is a better way of hiding the password, besides from "Locking the project from viewing". I am setting the sheet in xlSheetVeryHidden, but still someone can see the pasword if they want to.

Here is the code:

Private Sub Workbook_Open()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("OpenLog")

If Not ws.Visible = xlSheetVeryHidden Then ws.Visible = xlSheetVeryHidden
ws.Protect Password:=1214, UserInterFaceOnly:=True

End Sub

Any help is appreciated

Nick.

braX
  • 11,506
  • 5
  • 20
  • 33
  • Passwords may not be as tough as you hope, see : https://stackoverflow.com/q/11649064/4961700 – Solar Mike Oct 10 '18 at 06:21
  • Data you hand out to another person is always exposed. All kind of hiding the data in a sheet or protecting a sheet are insecure in a way. They only stop regular users from watching them but a professional might always crack it with more or less effort. The only secure way is *not* to hand out secret data at all by using a server/client setup, where only the server knows the raw data and hands out only the result to the client. – Pᴇʜ Oct 10 '18 at 06:42

0 Answers0