Hi
This needs some work, but may get you started.
1) Build a user form that contains a textbox, and a commandbutton. Select a character for the passwordchar property in the textbox.
2) Select the command button on the form and view code. Enter the following
Private Sub CommandButton1_Click()
Select Case TextBox1.Text
Case "fred"
pic = "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Blue Hills.jpg"
Case "sam"
pic = "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\sunset.jpg"
End Select
ActiveSheet.Pictures.Insert (pic)
Unload Me
End Sub
3) Right click on the sheet tab, select view code and enter
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count = 1 And Target.Address = "$D$3" Then
UserForm1.Show
End If
End Sub
Now if you select D3 on the current sheet, it should raise the userform. If you enter fred or sam in the textbox, and press the button, it should bring in the picture (if the relevant picture exists at that path....).
I didn't try to put a size on the picture, or name the picture, or delete any existing picture (hence the need to name any picture that you insert so you know what to delete).
HTH
rylo
Bookmarks