Collapse the table of content
Expand the table of content
Expand Minimize

Application.Hinstance Property (Excel)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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

expression .Hinstance

expression A variable that represents an Application object.

Important note Important

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- and 64-bit versions of Excel.

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

Sub CheckHinstance() 
 MsgBox Application.Hinstance 
End Sub
© 2016 Microsoft