Custom Properties

Vishesh's picture

This is how you can create a Custom Property in an Excel Workbook to save information. Go to File->Property  (as in pic).

Here is the code to read and write to the Custom Property.

Sub SetProperty()
 
    ThisWorkbook.CustomDocumentProperties("EmpName") = "Vishesh"
 
End Sub
 
 
Sub GetProperty()
 
    MsgBox ThisWorkbook.CustomDocumentProperties("EmpName").Value
 
End Sub

Custom Properties