Masking Characters

Some videos you may like

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Ed B. Delen

Board Regular
Joined
Feb 16, 2005
Messages
78
hi
Idont know if this is what do you mean...it's not so clear but try this.

type '******** on that cell, then drag it down till the last cell you want it.

good luck
ed
 

Can_This_Be_Don

Board Regular
Joined
Feb 15, 2005
Messages
88
Not what I'm after. I'll try and explain a bit better.

What ever the user types in column B I would like it to show as **** so that other users are unable to read it. I'll be using that column to setup passwords.

So for example if 1234 is typed I would like to see **** even though the underlying number (or text) is still there.
 

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,224
You are pursuing a good idea with a bad design. Worksheet cells can be masked that way with custom formatting (either native or with VBA) but the formula bar will still display the underlying value. Hiding the formula bar or making something happen when column B is Selected or Changed through those worksheet level events will not do you any good.

Don't use a cell for this, use an ActiveX textbox, either in a userform, or, if you are not familiar with userforms, at least placing a textbox from the Control Tookbox toolbar onto the cell or sheet area where the input would take place. Then, set that textbox's PasswordChar character to * and you will get what you need at that level. From there you can extract the textbox's underlying value with some event such as another button click or whatever you decide should be the point where a proper password was entered and needs to be evaluated as being valid.

Example: Assuming your sheet is named "Sheet1" and your textbox is named "TextBox1" then this base syntax would do it
?Worksheets("Sheet1").TextBox1.Value
In this case the underlying value is returned in the Immediate Window, but again you'd write or recognize that in some other more convenient way, perhaps as a variable or whatever you were thinking of.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,315
Members
414,053
Latest member
Dual Showman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top