Pictures in excel

G

Gerry

Does anyone know of a good source where I can learn about
using picures in excel?
ie. type a persons name in a cell and his picture appears
adjacent?
 
F

Frank Kabel

Hi
not a book reference but as a starting point a worksheet event macro
(put this code in your worksheet module):
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Address(False, False) = "A1" Then
If .Value <> "" Then
Application.EnableEvents = False
.Offset(0, 1).Select
Me.Pictures.Insert ("D:\Temp\image.jpg")
Application.EnableEvents = True
End If
End If
End With
End Sub

This inserts a picture (image.jpg) if you enter anything in cell A1

You may also consider using just a hyperlink to your image. This could
easily achieved with the HYPERLINK formula
 
G

Gerry

Thanks Frank
-----Original Message-----
Hi
not a book reference but as a starting point a worksheet event macro
(put this code in your worksheet module):
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Address(False, False) = "A1" Then
If .Value <> "" Then
Application.EnableEvents = False
.Offset(0, 1).Select
Me.Pictures.Insert ("D:\Temp\image.jpg")
Application.EnableEvents = True
End If
End If
End With
End Sub

This inserts a picture (image.jpg) if you enter anything in cell A1

You may also consider using just a hyperlink to your image. This could
easily achieved with the HYPERLINK formula


--
Regards
Frank Kabel
Frankfurt, Germany



.
 

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

Top