Thread: vb Help
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default vb Help

Sub dural()
If Environ("username") = "ravenswood" Then
ActiveSheet.Unprotect
End If
End Sub

or some other specific username.
--
Gary''s Student - gsnu200855


"Stig - tame racing driver" wrote:

I have a password protect sheet, and all I'm after is a way to automatically
unlock the sheet when certain uses (admin) open it

I did have a go using this

If Environ = ("username") Then
ActiveSheet.Unprotect Password:="password"

Regards