Does anyone know how to mask it with asterisk? for example when i input the salary (15000) in a cell it will turn to *****..
thanks..
Does anyone know how to mask it with asterisk? for example when i input the salary (15000) in a cell it will turn to *****..
thanks..
You could change the font to Wingdings!
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Best to use a userform as that has a password character property on textboxes.
Or you could even use the camera to reflect a different cell.
But of course the real value is there and can be seen with a simple =A1.
even if i change the font it will be visible in the formula bar..
and i can't use the userform because my excel file is like in this format and i don't know how many employees are..
is there any other way using vba to change it to asterisk?
No, this can't be done.
If you write code that allows you to enter a number it is displayable until you press enter. You can then replace the value with an encrypted version, but if you then want to see the actual value you would need to run some code to decrypt it (after prompting you for a password maybe)
Why not write it in a white cell with a white font and then protect the sheet with the relevant settings on the cells ?
2+2=9 ... (My Arithmetic Is Mental)
the salary will be inputted by the user, the reason why i'm doing this is to prevent others see the salary of the employee..
ok, thanks to all for your reply..
thanks..
or hide the formula bar
Steve
"Nearly all men can stand adversity, but if you want to test a man's character, give him power."
-Abraham Lincoln
You can use your controls toolbar to insert a textbox in the cell, then format it so it look like an ordinary cell and use its PasswordChar property to conceal what's in there
You know you're really in trouble when the light at the end of the tunnel turns out to be the headlight of a train hurtling towards you
The major part of getting the right answer lies in asking the right question...
Made your code more readable, use VBA tags (this automatically inserts [vba] at the start of your code, and [/vba ] at the end of your code) | Help those helping you by marking your thread solved when it is.
Sorry, but if they are being entered by the user, the encryption system will work, the encryption is done via a change in a cell and the user (any user) can't decrypt it. Then You come along and have a macro that asks do you wish to encrypt or decrypt column J (say) if decrypt it asks you for a pass phrase, it then makes all values readable.
The only problem with this is that user B 'may' enter another value for user A's salary and you would not know.
Another issue is that user B could just keep entering different values in his salary field until it matches user A's field, then he'd know. This could be got round with a second encrypted field with stores an encrypted randomly generated pass phrase for the salary field.
So your pass phrase decrypts the salary pass phrase which decrypts the salary.
It can be done but it ain't easy !
2+2=9 ... (My Arithmetic Is Mental)
this is an overview of my employee info sheet.. i'm thinking to put a button above the Monthly Salary of New Employee table and Transfer Table with a caption of "Mask Salary" if they will press the button it will mask to asterisk but still the amount in the salary column can be use for computation..
this is the code from the button of Insert Row from New Eployee Table and Transfer Table..
[VBA]
Sub procEXP_InsertRow_EmpInfoSheet_NewEmp()
With Application
.ScreenUpdating = False
With .ActiveSheet
.Unprotect modExpMisc.strPassword
With .Range("EXP_InsertRow_EmpInfoSheet_NewEmp")
.EntireRow.Insert
.Offset(-2, 0).EntireRow.Copy
.Offset(-1, 0).PasteSpecial xlPasteAll
End With
.Protect modExpMisc.strPassword
End With
.ScreenUpdating = True
End With
End Sub
Sub procEXP_InsertRow_EmpInfoSheet_TransferEmp()
With Application
.ScreenUpdating = False
With .ActiveSheet
.Unprotect modExpMisc.strPassword
With .Range("EXP_InsertRow_EmpInfoSheet_TransferEmp")
.EntireRow.Insert
.Offset(-2, 0).EntireRow.Copy
.Offset(-1, 0).PasteSpecial xlPasteAll
End With
.Protect modExpMisc.strPassword
End With
.ScreenUpdating = True
End With
End Sub
[/VBA]
Thanks
Should not HR be doing this ?
2+2=9 ... (My Arithmetic Is Mental)
i'm working with the finance dept for their budget.. this sheet is included with the expense statement.. (employee's salary, benefits,..)