I want to enter a name and have that person's photo appear. He
This worked great for me. I had tweek a couple of minor things. Thanks so
much! DD...
"K Dales" wrote:
Not sure exactly what you want. Do you want to be able to select an employee
(e.g. from a combobox) and have that person's picture appear in a frame on
the worksheet? If so here is a simple way to set that up that works nicely
as long as all the pictures are about the same aspect ration (width to height
ratio):
1) Make your employee list with a column of names and a column beside it
that gives (as simple text) the path to the picture file. I named my range
"EmployeeList" for convenience.
2) On your worksheet from the drawing toolbar add a simple, regular
rectangle of the appropriate size for the picture (pay attention to the name
Excel gives it when you add it - probably "Rectangle 1" if it is the first
shape you added).
3) Set up a combobox from the Forms toolbar. Right-click to format the
control. Make the input range your employee list. Set up the cell link to a
convenient cell - I again used a named cell called "Employee" for convenience.
4) Now right-click the combobox and assign the following macro:
Sub DropDown1_Change()
Dim PicPath As String
PicPath = Range("EmployeeList").Cells(Range("Employee"), 2)
ActiveSheet.Shapes("Rectangle 1").Fill.UserPicture (PicPath)
End Sub
When you use the combobox to select a person's name their picture should
appear in the rectangle.
--
- K Dales
"Doyle Diener" wrote:
A simple roster of "Floor Personnel" will have entries for each position in
spreadsheet cells. I want to link the entries to hyperlinks with photos of
each person by name. When the name is entered, the photo is called into the
appropriate position.
|