保护敏感信息Protect sensitive information

许多应用程序都使用应仅可用于确定用户的数据。Many applications use data that should be available only to certain users. 这有些建议,您可以采用以保护 Microsoft 窗体中的敏感信息:Here are some suggestions you can use to protect sensitive information in Microsoft Forms:

  • Write code that makes a control (and its data) invisible to unauthorized users.Write code that makes a control (and its data) invisible to unauthorized users. Visible 属性使控件可见或不可见。The Visible property makes a control visible or invisible.

  • Write code that sets the control's foreground and background to the same color when unauthorized users run the application.Write code that sets the control's foreground and background to the same color when unauthorized users run the application. This hides the information from unauthorized users.This hides the information from unauthorized users. 前**** 景色和**** 背景色属性决定前景色背景色The ForeColor and BackColor properties determine the foreground color and the background color.

  • Disable the control when unauthorized users run the application.Disable the control when unauthorized users run the application. Enabled 属性确定何时禁用控件。The Enabled property determines when a control is disabled.

  • Require a password for access to the application or a specific control.Require a password for access to the application or a specific control. You can use placeholders as the user types each character.You can use placeholders as the user types each character. [PasswordChar] ((PasswordChar-property.md) 属性定义占位符字符。The [PasswordChar]((passwordchar-property.md) property defines placeholder characters.

备注

[!注释] 使用密码或任何所列出的其他技术可以提高应用程序的安全性,但是不能保证能阻止对您的数据的未授权访问。Using passwords or any other techniques listed can improve the security of your application, but does not guarantee the prevention of unauthorized access to your data.

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.