2k05gt
Board Regular
- Joined
- Sep 1, 2006
- Messages
- 157
I found code that will allow for 2 images to show / hide based on cells value,
But I have 10 columns and each column has 5 images (Icons).PNG
Each Column has 5 icons, one is visible on each column by default Thats "IMGA1"
There are 5 Categories for each Column
Helper -ImgX1
Apprentice -ImgX2
Journeyman -ImgX3
Master -ImgX4
Inspector -ImgX5
Columns are for Each Trade.. Each Trade has a different Logo for each Level of License.
So....
If A2 Value = "Journeyman" then show "ImgA3"
If B2 Value = "Master" then show "ImgB4"
Electrical Plumbing HVAC ...
A2 B2 C2 D2 E2 F2 G2 H2 I2 J2
ImgA1 ImgB1___
ImgA2 ImgB2___
ImgA3 ImgB3___
ImgA4 ImgB4___
ImgA5 ImgB5___
I tried to do a Case Else code but it got to confusing
This was going to be a lot of lines
then I also Tried
I realised this was going to be to complex, and Ideas ??
But I have 10 columns and each column has 5 images (Icons).PNG
Each Column has 5 icons, one is visible on each column by default Thats "IMGA1"
There are 5 Categories for each Column
Helper -ImgX1
Apprentice -ImgX2
Journeyman -ImgX3
Master -ImgX4
Inspector -ImgX5
Columns are for Each Trade.. Each Trade has a different Logo for each Level of License.
So....
If A2 Value = "Journeyman" then show "ImgA3"
If B2 Value = "Master" then show "ImgB4"
Electrical Plumbing HVAC ...
A2 B2 C2 D2 E2 F2 G2 H2 I2 J2
ImgA1 ImgB1___
ImgA2 ImgB2___
ImgA3 ImgB3___
ImgA4 ImgB4___
ImgA5 ImgB5___
I tried to do a Case Else code but it got to confusing
Code:
Select Case Range("A2").Value
Case Is = "Helper"
Set Pic1 = Sheets("Sheet2").Shapes("ImgA1").Show
Else
then I also Tried
Code:
Private Sub Worksheet_Calculate()
Dim oPic As Picture
Elect.Pictures.Visible = False
Pictures("Picture 3").Visible = True
With Range("A2")
For Each oPic In Elect.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub
I realised this was going to be to complex, and Ideas ??
Last edited: