Hi Guys,

I'm working on small excel programm which Can shows pictures depends on if statement,for example I have table in sheet DATA:


item comp no
1 Box 010
1 Box 020
1 Box 030
1 Label 050
1 Label 060
2 Box 010
2 Box 020
2 Label 050
2 Label 060
2 Label 070

Mcode:
Private Sub item_Change()
On Error GoTo 0
For i = 1 To 10
item = A1
If item = Worksheets("DATA").Cells(i, 1) And Worksheets("DATA").Cells(i, 2) = "Box" Then
box1.Caption = Worksheets("DATA").Cells(i, 3)
box2.Caption = Worksheets("DATA").Cells(i+1, 3)
box3.Caption = Worksheets("DATA").Cells(i+2, 3)
box4.Caption = Worksheets("DATA").Cells(i+3, 3)
box5.Caption = Worksheets("DATA").Cells(i+4, 3)
My code shows texts in box1 box2 box3 etc but It also shows text from 4th row.
I would like to show just Cells(i, 3) in boxs when Worksheets("DATA").Cells(i, 1) And Worksheets("DATA").Cells(i, 2) = "Box"

I really can't go thru it

Could you help me?

thank you