Get activex control
![get activex control get activex control](https://www.pcerror-fix.com/wp-content/uploads/2014/04/chromeactivexprompt4.jpg)
The controls will work if the user right-clicks the workbook and selects the Open command from the shortcut menu.
#Get activex control code#
For example, the following code sorts the range: Private Sub CommandButton1.ClickĬontrols on a Microsoft Excel workbook embedded in a document in another application will not work if the user double-clicks the workbook to edit it. You can work around this problem by activating some other element on the sheet before you use the property or method that failed. For example, the Sort method cannot be used when a control is active, so the following code fails in a button click event procedure (because the control is still active after the user clicks it). Some Microsoft Excel Visual Basic methods and properties are disabled when an ActiveX control is activated. The following example scrolls the workbook window so CommandButton1 is in the upper-left corner. These properties can be set and returned using the ActiveX control name.
![get activex control get activex control](https://help.autodesk.com/cloudhelp/2016/ENU/MAXScript-Help/images/GUID-FBC56514-C0D8-4DE1-A287-3DDC23D07E5E-low.gif)
In addition to the standard properties available for ActiveX controls, the following properties can be used with ActiveX controls in Microsoft Excel: BottomRightCell, LinkedCell, ListFillRange, Placement, PrintObject, TopLeftCell, and ZOrder. Keep the following points in mind when you are working with controls on sheets: For general information on adding and working with controls, see Using ActiveX Controls on a Document and Creating a Custom Dialog Box.
![get activex control get activex control](https://heise.cloudimg.io/v7/_www-heise-de_/download/media/manage-registry-activex-control-35565/manage-registry-activex-control-1_1-1-5.jpg)
This topic covers specific information about using ActiveX controls on worksheets and chart sheets.