Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default select picture with list

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select a picture according to a selection on a dropdown box Johanna Gronlund Excel Discussion (Misc queries) 3 February 2nd 10 08:12 PM
How to select a range and save it as a picture (.gif, jpg, bmp, .. Andrea72 Excel Programming 0 November 13th 07 03:42 PM
how to select cells behind picture Brian Excel Discussion (Misc queries) 1 August 25th 06 04:45 PM
I cannot select more than 1 picture to insert. Why? c3rc2 Excel Discussion (Misc queries) 4 June 30th 06 01:50 PM
How to select one by one picture on my sheet with VBA? marko Excel Discussion (Misc queries) 4 February 18th 06 10:08 PM


All times are GMT +1. The time now is 05:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"