This example displays a message box containing the MsoHTMLProjectState constant that indicates the current state of the HTML project in the active workbook.
Select Case ActiveWorkbook.HTMLProject.State
Case 1
MsgBox "The current state is " & _
"msoHTMLProjectStateDocumentLocked"
Case 2
MsgBox "The current state is " & _
"msoHTMLProjectStateProjectLocked"
Case 3
MsgBox "The current state is " & _
"msoHTMLProjectStateDocumentProjectUnlocked"
End Select