指定列表框的可能值
下面的示例在您打开窗体时用值"Test1"、"Test2"和"Test3"填充 ListBox 控件。
Sub Item_Open()
' Sets the name of page on the form, in this case, the
' Message page on a MailItem form.
Set FormPage = Item.GetInspector.ModifiedFormPages("Message")
' Sets Control to a list box called ListBox1.
Set Control = FormPage.Controls("ListBox1")
' Assign values to the list box.
Control.PossibleValues = "Test1;Test2;Test3"
End Sub
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。