This technique works ok if you're using xl2k or higher.
Add all 50(?) pictures to a worksheet. Locate each right where you want them to
appear.
Give them nice names. Pict_AL, Pict_AK, ..., pict_WI
Then put the two letter state abbreviations in A1:A50 (in a hidden? worksheet).
Give that range a nice name ("ValidStates").
Add Data|validation to the cell that will get the state abbreviation. Use List
and source of
=ValidStates
Then rightclick on the worksheet tab that should have this behavior and select
view code.
Paste this in:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Me.Pictures.Visible = False
On Error Resume Next
Me.Pictures("pict_" & Target.Value).Visible = True
If Err.Number <> 0 Then
MsgBox "No picture for " & Target.Value
Err.Clear
End If
On Error GoTo 0
End Sub
======
The bad news is that in xl97, the worksheet_change event won't fire if you put
the data list in a range. (But it will if you put type it in that Source box!)
If you used a dropdown from the Forms toolbar or a combobox from the control
toolbox toolbar, then the code could be modified for that.