Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any way to link jpg files in Excel VLookup 1

Status
Not open for further replies.

SBendBuckeye

Programmer
May 22, 2002
2,166
US
I have a power user who has managed to put most of her information into a VLookup table. You enter the model number and all of the pricing, etc fills in for you. She has cut and pasted jpgs into another worksheet.

Is there any way to pull a copy of the model picture over into the regular spreadsheet? I know graphic objects just "float" on top. Could she link them somehow via hyperlinks? Or is there a way to put them in a separate sheet like a chart and pull them from there? Any ideas or suggestions?

Thanks for the help!
 
THERE IS A WAY THAT WHEN YOU DOUBLE CLICK ON A CELL A POPUP
WINDOW WITH THE JPG FILE CAN POP UP

HERE IS HOW
FIRST YOU NEDD A FOLDER WITH ALL THE JPG’S ON IT.

put this sub in the workbook object bit
in the activecell line put in your cell values.
create a userform called userform2 but put nothing in it
when you double click on your cell it will display the picture



Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)

On Error GoTo Errorhandler

Filename = ActiveCell.Value
UserForm2.Picture = LoadPicture("C:\Picture folder\" & Filename & ".jpg")
UserForm2.Show


Exit Sub

Errorhandler: 'below exit sub

Dim style, msg
style = vbCritical
msg = ("No picture is available for this object")
error1 = MsgBox(msg, style)
ActiveCell.Font.Color = RGB(255, 0, 34)

End Sub



I HOPE THIS HELPS
QUILO
 
Hey Quilo,

Thanks a ton! That's a great start. I haven't worked with user forms a lot. Can you point me in a couple directions. Can I resize the form to match the picture size if there is variation?

Thanks again for the help and have a great day!
 
Dear SBendBuckeye

I don’t think is a way to make the window to resize automatically but on the user form properties you can change some settings like:
Height, width, zoom, picture size mode and many more features

I hope This Helps

QUILO
 
A new twist. I thought this was for the user's benefit. It turns out she is trying to create an order sheet for her dealers.

Can the above be done using a spreadsheet cell with the .jpg file inserted into it instead of to a file? In other words, can you assign a picture stored in a worksheet cell?

Thanks again for all of your help!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top