Share via


PublishObject.Sheet Property

Excel Developer Reference

Returns the sheet name for the specified PublishObject object. Read-only String.

Syntax

expression.Sheet

expression   A variable that represents a PublishObject object.

Remarks

This example determines the name of the worksheet that contains the first PublishObject object that is saved as static HTML in the Web page. The example then sets the Boolean variable blnSheetFound to True. If no items in the document have been saved as static HTML, blnSheetFound is False.

Example

Visual Basic for Applications
  blnSheetFound = False
For Each objPO In Workbooks(1).PublishObjects
    If objPO.HtmlType = xlHTMLStatic Then
        strFirstPO = objPO.Sheet
        blnSheetFound = True
        Exit For
    End If
Next objPO

See Also