select picture with list
This can be done. Here there is a dropdown in a1 tied to this macro in
you SHEET module.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
Dim Shp As Shape
On Error GoTo PictureNotFound
Worksheets("Sheet1").Shapes(Me.Range("A1").Value). Copy
'Worksheets("Sheet1").Shapes("don1").Copy
'Delete the previous picture
For Each Shp In Me.Shapes
If Shp.Type = msoPicture Then
If Shp.TopLeftCell.Address = "$C$1" Then
If Shp.Name < Range("A1").Value Then Shp.Delete
End If
End If
Next
Worksheets("Sheet2").Paste
With Selection
.Name = Range("A1").Value
.Top = Range("C1").Top
.Left = Range("C1").Left
End With
Range("A1").Select
Exit Sub
PictureNotFound: MsgBox "Picture not found!" & vbNewLine _
& "Check Name."
End If
End Sub
On Feb 16, 12:53*am, kalpesh
wrote:
Hello,
*in sheet1
*contain customer name & i create a list of customer name
*a1 cell contain list
*now ,
*i select name of customer in list, photo of customer is shwon in b1 cell
*please vba help or macro for this
|