![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 76
|
Hi,
I want a cell in excel to store a password. How can I do that? Thanks, Karthik. |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,065
|
Hi --
Choose your cell and type the passwork needed Use Auto_Clse in VBA to set on close the password in cell XXXXX, this will look to see the text and save password as that/ Does that help?
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,387
|
Here's one way to protect or unprotect a sheet by entering the passwords in a cell. Try this in your worksheet module. Before doing so, be sure to unlock cell A1 or whatever cell(s) you want to have access to. Modify the passwords as you wish, although the ones in this example are excellent choices.
''''''''''''''''''''''''''''''''''''''''' Private Sub Worksheet_Change(ByVal Target As Range) If [A1] = "Tom" Then ActiveSheet.Unprotect ElseIf [A1] = "Urtis" Then ActiveSheet.Protect End If End Sub '''''''''''''''''''''''''''''''''''''''''' |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|