The Address Book That Contains Pictures

            In this study, we created an address book that views the picture according to records.With button, the selected image from computer can be added to the item and can be deleted.

The file path of the selected picture is assigned to the empty cell :(C:\Project_1\NewPictures\TestImage3.jpg) etc.

            This picture is displayed on the userform with Image Control(Image control is used to display a picture on the userform).


excel address book with image

"Add Image" button codes to add images :
Private Sub CommandButton9_Click()
Dim ara As Range, dosya As Variant
If TextBox1 = "" And TextBox3 = "" Then
MsgBox "Not Any Item Selected", vbCritical
Exit Sub
Else
dosya = Application.GetOpenFilename(FileFilter:="," & "*.jpg;*.gif;*.jpeg;*.bmp;*.GIF;*.JPG;*.tiff;*.tif",Title:="Please Choose An Image")
If dosya = False Then
MsgBox "Image Not Selected", vbCritical
Exit Sub
Else
Image3.Picture = LoadPicture("")
Set ara = Sheets("liste").Range("B:B").Find(ListBox1, , xlValues, xlWhole)
If Not ara Is Nothing Then
Sheets("liste").Cells(ara.Row, 10).Value = yol & dosya & uzanti
Image3.Picture = LoadPicture(yol & dosya & uzanti)
End If
End If
End If
End Sub

4 comments:

  1. great and many thanks for sharing

    ReplyDelete
  2. Muy bueno altamente recomendable

    ReplyDelete
  3. hello. I'm in touch with you from Mongolia.
    I want to use this model that you created in the student database.
    But one problem is not solved.

    Additionally, combobox is added to the sex section. Controls ("textbox" & a + 1) = ListBox1.Column (a) how to fix the error.

    ReplyDelete