Pictures in excel

  • Thread starter Thread starter Gerry
  • Start date Start date
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?
 
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
 
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



.
 
Back
Top