ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   change the characters entered in cell as a Password charactes (https://www.excelbanter.com/excel-programming/347494-re-change-characters-entered-cell-password-charactes.html)

Tom Ogilvy

change the characters entered in cell as a Password charactes
 
You could use the change event

Right click on the sheet tab and select view code. then put in code like
this:

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrHandler
If Target.Address = "$B$9" Then
Application.EnableEvents = False
sStr = Chr(34) & Application.Rept( _
"*", Len(Target.Value)) & Chr(34)
Target.NumberFormat = sStr & ";" & sStr & ";" & _
sStr & ";" & sStr
End If
ErrHandler:
Application.EnableEvents = True
End Sub

--
Regards,
Tom Ogilvy


"rajendran" wrote
in message ...

Tom,

Its displaying only one "*" for the whole word. cant we change each
character to "*" and get it vb script code.

Actually i am having a username and password (for my server )to be
typed in a cell. cant we make the same appearence as standard password
field.

Regards
Raj


--
rajendran
------------------------------------------------------------------------
rajendran's Profile:

http://www.excelforum.com/member.php...o&userid=29252
View this thread: http://www.excelforum.com/showthread...hreadid=491419





All times are GMT +1. The time now is 10:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com