ADAMC
Well-known Member
- Joined
- Mar 20, 2007
- Messages
- 1,169
- Office Version
- 2013
- Platform
- Windows
Hi all, as always thanks for any help in advance.
I have searched the bored and almost found some code to what i require.
The code was written by Datsmart:
Basically i have 4 pictures somewhere on my sheet of 4 flags one red one green one ornge an one grey.
They work like flags in outlook, green complete an so on.
Using the code above if i type red in a cell the pic of red flag appears to the right which is what i want but if i go down to the next row and type red for the next action point, the flag above disappears and appears to the right of where i last wrote the text....
Can the code be adapted so the flag stays for any instance of the typed word...
So if i type red my red pic appears when i tab to the next row and type red the pic doesnt move from the previous row....?
Hope this makes sense.
Thanks
I have searched the bored and almost found some code to what i require.
The code was written by Datsmart:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oPic As Picture
Me.Pictures.Visible = False
With Target
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Offset(0, 1).Top
oPic.Left = .Offset(-1, 1).Left
Exit For
End If
Next oPic
End With
End Sub
Basically i have 4 pictures somewhere on my sheet of 4 flags one red one green one ornge an one grey.
They work like flags in outlook, green complete an so on.
Using the code above if i type red in a cell the pic of red flag appears to the right which is what i want but if i go down to the next row and type red for the next action point, the flag above disappears and appears to the right of where i last wrote the text....
Can the code be adapted so the flag stays for any instance of the typed word...
So if i type red my red pic appears when i tab to the next row and type red the pic doesnt move from the previous row....?
Hope this makes sense.
Thanks