Application.Hinstance property (Excel)

Returns a handle to the instance of Excel represented by the Application object. Read-only Long.



expression A variable that represents an Application object.



This property returns a correct handle only in the 32-bit version of Excel. In Excel, the HinstancePtr property was introduced, which works correctly in both 32-bit and 64-bit versions of Excel.


In this example, a message box displays the Excel instance handle to the user.

Sub CheckHinstance() 
 MsgBox Application.Hinstance 
End Sub

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.