Display The Pictures On Userform

Display The Pictures On Userform & Picture Management With Userform

         In this tutorial, with userform, you can add and delete new images to the workbook folder.
As an example, we added the workbook and some images to a folder. When the userform is loaded, the names of images with .jpg extension in the folder are sorted on the listbox. 
The image selected from the listbox is displayed on the “image control”. 

We used the following codes to list the jpg images in the listbox:
Dim fso As Object, dosyam As Variant
    Set fso = CreateObject("Scripting.FileSystemObject")
    For Each dosyam In fso.GetFolder(ThisWorkbook.Path).Files
    evn = fso.GetExtensionName(ThisWorkbook.Path & "/" & dosyam.Name)
    If evn = "jpg" Then ListBox1.AddItem dosyam.Name
    If ListBox1.ListCount > 0 Then
    ListBox1.Value = ListBox1.List(0)
    End If

    Set fso = Nothing

By clicking the buttons on the userform you can add new pictures to the folder and delete them.

A different example of Excel VBA Image Control.


  1. Please Explain what the variables:
    that you use in several examples

    variable: ara, boyut, say, sat, sor, sort, cevap, sansat, dosya, deoj, uzanti, yo, yol