How to use and add the Image ActiveX control and display an image in an Excel workbook

Who I am
Pavel Yosifovich
@pavelyosifovich
Author and references

Using the Image ActiveX control can be especially useful for complex tables and textbooks, using this feature is possible add and edit parameters relating to images and photographs.

How to use and add the Image ActiveX control and display an image in an Excel workbook

ActiveX options are very useful for improve our Excel tables, they are usually a tool for advanced users, but undeniably their use has great advantages. With them it is possible automate our Excel workbooks, also to add buttons for different functions.



In addition to the above, it is recommended that you learn how to configure text control and ActiveX command button in Excel, something that may help you understand the process below.

If you are interested in adding a button with which you can easily add an image to an Excel workbook, read the following guide:

  1. The first thing to do is to go to the Developer section, within this menu you have to locate the Insert function, press on it and then go to the ActiveX Controls tab.
  2. There will the option image (ActiveX control), click this option.
  3. After clicking on the previous option, a small box will appear on the screen, this is the box of your image, adjust it according to the size you want it to appear in.
  4. Now you will need to insert a command button to generate the button to add an image to the Excel workbook. To do this, go to the developer section, click Insert and finally click the option Command button on ActiveX controls.
  5. Put the button in the place that looks best to you, so drag and drop it in the size you think is most suitable.
  6. The button configuration options will be displayed on the screen. The first thing to change is the name, click on (Name) and write the name you think is best, for example " SelectImage «.
  7. Now go to the Caption section and enter the name that will be displayed on the button, for example "Select Image".

Add an ActiveX control button to add an image

The process of creating the code within Microsoft Excel may seem complicated to most users and this is where they usually don't know what to do. In any case, following our guide, you can create a button to create an image very easily:



  1. Click the image box and then click the View Code option.
  2. The code screen will appear, change the option from (General) to  Select image. Make sure the option next to SelectImage is on Click.
  3. It's time to create the variable, in the code window, as the first line, type .dim image come Variant and press Enter.
  4. In the next line of code you have to write the following image = application.GetOpenFilename (File-Filter: = “Image * .gif; * .jpg; * .jpeg; * .png; * .bmp, * .gif; *. jpg; * .jpeg; * .png; * .bmp «, Title: =» Select image «, Multiple selection = False).
  5. In the next line of code you will need to write the following Image1.Picture = LoadPicture(picture).
  6. Now you just need to click on the Save option and close the code window.

By carrying out the above procedure, you will already have a functional button with which you can easily add an image to your Excel workbook.



You can also configure the ActiveX radio button and customize the text in linked cells - another excellent automation feature when using the tool in this office software.

Audio Video How to use and add the Image ActiveX control and display an image in an Excel workbook
add a comment of How to use and add the Image ActiveX control and display an image in an Excel workbook
Comment sent successfully! We will review it in the next few hours.