Hi All,
Kindly forgive my programming, I have been playing with this code but cannot do the right syntax. I want the image to remain hidden until chosen so I put this code but I am not getting it. What is the right way of writing the code? Kindly help....
thanks,
splucena
Kindly forgive my programming, I have been playing with this code but cannot do the right syntax. I want the image to remain hidden until chosen so I put this code but I am not getting it. What is the right way of writing the code? Kindly help....
Code:
Private Sub ComboBox1_Change()
Dim ProdFound As Range
[COLOR=Red]Image.Visible = False[/COLOR]
With Worksheets("1L").Range("A:A")
Set ProdFound = .Find(ComboBox1.Value, LookIn:=xlValues)
If ProdFound Is Nothing Then
MsgBox ("ITEM NOT FOUND!")
ComboBox1.Value = ""
Exit Sub
Else
With Range(ProdFound.Address)
Label2 = .Offset(0, 1)
Label3 = .Offset(0, 2)
Label4 = .Offset(0, 3)
Label5 = .Offset(0, 4)
Label6 = .Offset(0, 5)
Label7 = .Offset(0, 6)
Label8 = .Offset(0, 7)
Label9 = .Offset(0, 8)
Label10 = .Offset(0, 9)
Label11 = .Offset(0, 10)
Label12 = .Offset(0, 11)
Label13 = .Offset(0, 12)
Label40 = .Offset(0, 15)
Label40.BackColor = RGB(255, 255, 0)
On Error Resume Next
[COLOR=Red] Image.Visible = True[/COLOR]
Image1.Picture = LoadPicture _
("C:\Documents and Settings\NOEL\Desktop\PHOTO2\" & ProdFound & ".jpg")
On Error GoTo 0
End With
End If
End With
End Sub
thanks,
splucena