SubAddress 属性

expandtri全部显示

使用 SubAddress 属性可以指定或确定 Address 属性指定的目标文档中的位置。SubAddress 属性可以是 Microsoft Access 数据库中的对象、Microsoft Word 文档中的书签、Microsoft Excel 电子表格中的命名范围、Microsoft PowerPoint 演示文稿中的幻灯片,或者是 HTML 文档中的位置。String 型,可读写。

expression.SubAddress

expression     必需。返回“应用于”列表中的一个对象的表达式。

说明

SubAddress 属性是一个字符串表达式,表示由 HyperlinkAddress 属性指定的目标文档中命名位置的 HyperlinkSubAddress 属性。

可以使用 Visual Basic 通过 SubAddress 属性设置 HyperlinkSubAddress 属性。

注释  可以使用控件的属性表Visual Basic 来设置 HyperlinkSubAddress 属性。

当光标移到已设置了 HyperlinkSubAddress 属性的命令按钮图像控件标签控件上时,光标将变为向上指的手形,此时单击控件将显示链接所指定的对象或网页。

有关超链接地址及其格式的详细信息,请参阅 HyperlinkAddressHyperlinkSubAddress 属性主题。

示例

下面的示例将“Suppliers”窗体上名为“Label20”的标签转变为活动的超链接。当用户单击该超链接时,Access 会打开“Postal Operations”数据库中的“Mailing List”窗体。

With Forms("Suppliers").Controls("Label20").Hyperlink

    .Address = "PostalOperations.mdb"

    .SubAddress = "Form Mailing List"

End With