简体   繁体   English

是否可以在 excel 中隐藏字符输入(输入)?

[英]Is it possible to hide character typing (input) in excel?

Is it possible to hide character typing in an Excel cells - so that the text itself is not visible when typing it.是否可以在 Excel单元格中隐藏字符输入 - 以便在输入时文本本身不可见。 I know that cell content can be masked, but the mask only appears after Enter's is pressed.我知道单元格内容可以被屏蔽,但只有在按下 Enter 后才会出现屏蔽。 Is it possible to achieve it before, like in password fields?以前是否有可能实现它,例如在密码字段中? Font color change to white and cells format fill will not fit.字体颜色变为白色,单元格格式填充将不适合。 Both VBA and the usual solutions are suitable. VBA 和通常的解决方案都适用。

I'd probably just use a userform:我可能只使用用户表单:

    IN >>> UserForm1:

Option Explicit
Private Sub GOButton_Click()
    Dim PW As String
    Sheet1.Range("A1").Value = Me.TextBox1.Text
End Sub

    IN >>> Sheet1(Sheet1):

Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Selection.Address = "$A$1" Then
        UserForm1.Show
    End If
End Sub

来自用户窗体设计器的示例 显示的用户窗体示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM