Use Worksheet object and not Sheet object
Other topicsPrint the name of the first object
Option Explicit
Sub CheckWorksheetsDiagram()
Debug.Print Worksheets(1).Name
Debug.Print Charts(1).Name
Debug.Print Sheets(1).Name
End Sub
The result:
Sheet1
Chart1
Chart1
Contributors
Topic Id: 9996
Example Ids: 30699
This site is not affiliated with any of the contributors.