View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Password a Macro so certain users can press it

This may help......

Sub EnterValueInProtectedCell()
Range("A1").Select
ActiveSheet.Unprotect Password:=("aaa")
Dim k
k = InputBox("Enter new value for cell A1:")
Range("a1").Value = k
ActiveSheet.Protect Password:=("aaa"), DrawingObjects:=True, Contents:=True,
Scenarios:=True
Range("A1").Select
End Sub


Vaya con Dios,
Chuck, CABGx3




" wrote:

I have a cell on my worksheet which is protected via the usual password
protect worsheet thing. However, i want to allow one person to write in
this cell my pressing a macro which allows him to do this, then lock
again after if possible? Anyone any ideas?