User image attached to a record

gemcgraw

Board Regular
Joined
Mar 11, 2011
Messages
72
I am on a rather unique project in my spare time- I am assisting an elder lady who loves her laptop and surfing the online resources. She owns a small used book store and would like to have a simple Excel spreadsheet where she can recall a book title, see a scanned image of the cover and know what to look for on the shelf. I envision writing a User form for more simplicity and ease of use. With this form, she can add new titles, assign a shelf location, and other information. I'm snagged on the best way it incorporate the image that she will be scanning. I need a way for her to point the image control to the folder where she will be storing the images scanned.

Would I set a blank, unassigned image control on the form, then when the Book is selected from a Combobox the link/path tied to the image would populate the imagine control? This much makes sense to me; however, I'm hung up on how to create the "Attach file" functionality for her to operate. She will need to navigate to the image, select it, then the path is converted to a link and stored in the spreadsheet. I haven't even begun to code for this until I get a good concept nailed down. Any brainstorming and suggestions would be appreciated.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Perhaps you could use a button to open a dialog to allow the user to select a thumbnail of the image.
Code:
Dim fd As FileDialog
Dim strPictureLink As String

    Set fd = Application.FileDialog(msoFileDialogFilePicker)

    With fd
        .AllowMultiSelect = False
        .Filters.Add "Images", "*.gif; *.jpg; *.jpeg", 1
        .InitialView = msoFileDialogViewThumbnail
        .InitialFileName = "C:\Users\Norie\Pictures\"

        If .Show = -1 Then
            strPictureLink = .SelectedItems(1)
        End If

    End With
 
Upvote 0
Thanks, Norie! This is perfect. I just couldn't get my head wrapped around this segment of the project. I do appreciate your help.

Perhaps you could use a button to open a dialog to allow the user to select a thumbnail of the image.
Code:
Dim fd As FileDialog
Dim strPictureLink As String

    Set fd = Application.FileDialog(msoFileDialogFilePicker)

    With fd
        .AllowMultiSelect = False
        .Filters.Add "Images", "*.gif; *.jpg; *.jpeg", 1
        .InitialView = msoFileDialogViewThumbnail
        .InitialFileName = "C:\Users\Norie\Pictures\"

        If .Show = -1 Then
            strPictureLink = .SelectedItems(1)
        End If

    End With
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top