Sub TestPrintGeneralWBInfo()
Dim wb As Workbook
Set wb = ActiveWorkbook
Debug.Print "Name: " & wb.name
Debug.Print "Full Name: " & wb.FullName
Debug.Print "Code Name: " & wb.CodeName
Debug.Print "Path: " & wb.Path
If wb.ReadOnly Then
Debug.Print "The workbook has been opened as read-only."
Else
Debug.Print "The workbook is read-write."
End If
If wb.Saved Then
Debug.Print "The workbook does not need to be saved."
Else
Debug.Print "The workbook should be saved."
End If
End Sub