Add an ActiveX image control and assign VBA macro on a worksheet
Show/Display and enable the Developer Tab and controls on the Excel Ribbon toolbar
Insert new controls in developer tab - draw the control
Adding a button to run the custom macros
Creating VBA code - macros to Extend and Automate worksheets with button
If you need active x control in your worksheets with a macro call back follow these steps to inserting the image X control in one sheet.
Note: Your workbook need the extension .xlsm to allow macros (Please save as macro enabled book)
You have two options to access to the developer tab:
Click File > Excel Options and then click Customize Ribbon tab, and then check Developer tab or directly click on the ribbon tab and customize
Display the Developer tab Rick click in the ribbon (Select customize ribbon tab) then click Excel Options.
Select the option Show Developer tab, and then click OK.
in the Developer tab> Controls group, Select the image control button
To edit controls, press the design mode button and activate Design Mode Button.
Properties dialog box
Press Key F1 to display a VBA Help
You can create VBA solutions for automation of some task the procedures are used as ribbon controls with VBA calls and are useful to have a module with a separate code for the callbacks in the ribbon
You might already use Open XML editor to customize your custom ribbon creations the most popular is Office Custom UI editor for XML Optionally you can use Windows Notepad to write the XML callbacks Another option is Visual Studio because it can access to IntelliSense and more advanced features If Any procedure not run check the custom UI markup, check the name that you used in the OnAction attribute and the macro name in VBA
All control id section is unique (you not repeat any id) this action creates one error.
If you want to insert multiple images (multiple batch/bulk) based on folder path from a worksheet with file names in the cells, do you have any idea?
The Spreadsheet Picture Tools Add-in comes up with the solutions for you.
Download and Try the free trial version
Spreadsheet Image Tools Add-in & plugin