database with pictures in excel?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone, this is the problem:

I have a database with people names and other characteristics on an excel
sheet. Nothing much, simply something like this:

John Soul 24 1.75
Amanda High 32 1.68
etc...

What i would like to do is to create somekind of hyperlink in order to show
someone's picture on a determined location of the excel sheet when that
someone's cell is clicked. is it possible?
 
Hi
are your pictures stored in a separate file or have you included them in the
Excel file itself?
 
Of course it is possible.

Select the cell where you want to insert the hyperlink.
Click on Insert Menu and Select 'Hyperlink'
Then in Text to Display, entter "View Picture"
Then browse to the required picture file and click on OK.

Sharad
 
Hi,

Well, as of this moment the pictures are still stored as files on a folder.
But the idea would be to include them all in the Excel file itself. Then, if
a determined name on a cell would be clicked that someone's picture would
show up while the others remained unseen.

Thanks a lot for your time.
 
Huge Lagoon said:
Hi,

Well, as of this moment the pictures are still stored as files on a folder.
But the idea would be to include them all in the Excel file itself. Then, if
a determined name on a cell would be clicked that someone's picture would
show up while the others remained unseen.

Hi

I believe the file will bloat too much. AFAIK Pictures don't keep their
original compression when inserted into Office documents, they become
"windows metafiles" or something like that. You are better off with separate
jpg files and hyperlinks.

Access and other databases can store pictures though. This job may sound
like a database type of thing.

HTH. Best wishes Harald
 
This solution may work for you if you want to display pictures based on your
current selection.

First, add an image control to your worksheet. Right click on any available
toolbar to see the toolbar dropdown, and from there choose "Control
Toolbox". On the control toolbox you'll notice a wide variety of controls.
One of those controls is the Image control - click on it. Then, using your
mouse, you can draw where you want the image control to be on your
worksheet. Once it's on the sheet, right click to set the properties, and
name it whatever you want (Default will be Image1)

Now, in VBA, add the following code for your worksheet:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If (Target.Address = Range("A1").Address) Then
Image1.Picture = LoadPicture("C:\getfuzzy.gif")
ElseIf (Target.Address = Range("A2").Address) Then
Image1.Picture = LoadPicture("C:\story.gif")
Else
Image1.Picture = Nothing
End If
End Sub

In your case the If conditions will be different, I used something super
generic. My example also sets the Picture to blank (Nothing) if you don't
have anyone else selected. LoadPicture can point to we sites.

I hope this helps.

- Andy Tischaefer
Test Lead, Microsoft Office

This posting is provided as is, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top