pctechguide.com

  • Home
  • Guides
  • Tutorials
  • Articles
  • Reviews
  • Glossary
  • Contact

Quick and Simple Guide to Creating Image Catalogs in Excel

People use Excel to store various types of data. In many cases, this data needs an associated image. You need to know how to create a catalog of images in Excel that can be linked to our database.

HOW TO CREATE IMAGE CATALOGUES IN EXCEL

There are several methods to create an image catalog in Excel. Some Excel users prefer to implement the catalog by embedding the image associated with each record into the Excel sheet. However, if you have a database with many records you will end up with an Excel book that is too large because of the size of the images which will make it difficult to manage.

I always recommend using a VBA method because it allows us to leave the image files in a local folder on the computer and only load the images as they are used within our Excel database.

THE KEY TO CREATE THE IMAGE CATALOG

The key to having a catalog of images in Excel is to have a sheet that relates the “primary key” of our records with the corresponding image. If you are not familiar with the term “primary key” I recommend you read our previous articles on Database Design.

In the following example, you will see that I have a list of 5 Blu-ray movies and each of them has a unique product key.

How to create a catalogue of images in Excel

The images of each product will be stored in a directory called “images” and will have the same name as the product code to which they belong. Having the images with the same name as the product code will make it easier to manipulate them.

Repository of images for catalogue in Excel

INSERT AN IMAGE CONTROL

In order to be able to observe the product face image, I will insert an Image Control which is a type of ActiveX control. To do this I must go to the Programmer tab and in the Insert button select the appropriate control.

CREATE THE MACRO TO SHOW THE IMAGE

For this example, I will show the image when selecting a cell in the Code column. I will use the event Worksheet_SelectionChange. Right click on the name of the sheet and select the option View code and in the Visual Basic Editor select the event SelectionChange. Next, you will see the VBA code for that event:

Macro for Excel image catalog

The important part of this code is that when we select any cell within the A2:A6 range the Picture property of the Image1 object will be modified. The LoadPicture instruction is responsible for loading the image stored on our local hard drive:

LoadPicture(ActiveWorkbook.Path & “Images\” & Target & “.jpg”)

The ActiveWorkbook.Path instruction returns the current directory of the Excel file and concatenates it with the “images” directory where our files are located. Subsequently, the Target variable is concatenated, which contains the value of the selected cell and the extension of the image files is added, which for our example are JPG files.

TESTING THE CATALOG OF IMAGES IN EXCEL

Finally, I will prove that the newly created macro works correctly for our image catalog in Excel:

Example of an Excel image catalog

There are variants on this method and surely in another article, we will have the opportunity to explore different methods to show the images associated with a record of our database in Excel.  To continue with the tests you can download the workbook used along with the example images.

Filed Under: Communications

Latest Articles

Web Layers Removal

Web Layers is another malicious piece of software that will display unsolicited ads in your browser and redirect you to malicious websites. If you notice unusual activity on your computer caused by Web Layers, then it is recommended that you remove the software as soon as possible. Web Layers is … [Read More...]

Core i3

The Intel’s Core i3 was released in 2010 and was a low budget series of processors which was based on Nehalem microarchitecture (Clardale and Arrandale). This series of processors came as a replacement for Core 2 and the target market for these was the budgeted desktop/laptop market segment. The … [Read More...]

CoupMania Removal

CoupMania is another in a long list of annoying adware products. It is not a serious or malicious piece of software, but like other forms of adware, it can open up doors to other infection and be an overall nuisance. Therefore, it is best to remove CoupMania as soon as you are aware of its … [Read More...]

Revolutionize Your Internet Experience with Orbi 960 – The Ultimate WiFi System

In a world where seamless connectivity is essential, slow and unreliable internet connections are a major problem. Whether you are running a business, … [Read More...]

Do You Need a VPN When Trading Cryptocurrency?

There’s no doubt that the biggest global industries in 2023 are tech-driven, while there remains a significant crossover between many of these … [Read More...]

Goodbye Bitcoin: the 3 alternative cryptocurrencies that have great upside potential, according to experts

Bitcoin has been a very lucrative investment for people that got into it early. One report from The Motley Fool pointed out that $10 of bitcoin … [Read More...]

Self-driving cars face their Achilles’ heel and may be targets of hackers

The market for self-driving cars is booming. Customers spent $22.22 billion on these autonomous vehicles in 2021 and they will likely spend more in … [Read More...]

How to avoid scams with bitcoin and other cryptocurrencies

Cryptocurrencies got a bad reputation when scams multiplied like ants on a piece of cake. Even today many people associate bitcoin and other … [Read More...]

WHAT IS CLOUD COMPUTING AND WHAT ARE ITS MAIN BENEFITS?

Users are Increasingly using cloud computing to store their information, which is replacing local storage. The business digitization process goes … [Read More...]

Guides

  • Computer Communications
  • Mobile Computing
  • PC Components
  • PC Data Storage
  • PC Input-Output
  • PC Multimedia
  • Processors (CPUs)

Recent Posts

Windows Backup In Action

Click Start, point to All Programs > Accessories > System Tools, and then click Backup. The Backup or Restore Wizard is … [Read More...]

Why VoIP Is Better than Plain Old Telephone Systems

If you have been following the blog lately, you know we have been talking about VoIP a bit lately. We have talked about if you should cut your … [Read More...]

Regional codes for DVDs

Motion picture studios want to control the home release of movies in different countries because cinema releases aren't simultaneous (a movie … [Read More...]

[footer_backtotop]

Copyright © 2023 About | Privacy | Contact Information | Wrtie For Us | Disclaimer | Copyright License | Authors