PublishObject.Sheet property (Excel)

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

Syntax

expression.Sheet

expression A variable that represents a PublishObject object.

Example

This example determines the name of the worksheet that contains the first PublishObject object that is saved as static HTML on the webpage. 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.

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 

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.