View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default Storing value in a variable from a cell

Try

UserPass = Sheets("HiddenPass").Cells(4, 4).Value

or

UserPass = Sheets("HiddenPass").range("D4").Value


--
HTH

-------

Bob Phillips
"Saadi" wrote in message
...
hi I am try to make password protected workseets. every worksheet has its

own
password, stroed in a sheet named "HiddenPass". The problem is that how

can I
pick the value of Cell D4 of Sheet "HiddenPass" when I click on sheet
"Biodata". I am using "UserPass" as variable in Activate event of workseet
"Biodata".

The code I am using (but not worked)

UserPass = Sheets("Biodata").Cells(4, 4).Value


anyone could help.

Saadi