Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select a picture according to a selection on a dropdown box | Excel Discussion (Misc queries) | |||
How to select a range and save it as a picture (.gif, jpg, bmp, .. | Excel Programming | |||
how to select cells behind picture | Excel Discussion (Misc queries) | |||
I cannot select more than 1 picture to insert. Why? | Excel Discussion (Misc queries) | |||
How to select one by one picture on my sheet with VBA? | Excel Discussion (Misc queries) |