Private Sub CommandButton4_Click()
ShowPic
End Sub
Sub ShowPic()
For i = 1 To 310
myvar = Application.WorksheetFunction _
.VLookup(Worksheets("sheet1").Range("b" & i + 1), Worksheets("sheet1").Range("B:O"), 14, False)
OLEObjects("image" & i).Picture = LoadPicture(myvar)
Me.Controls("image" & i).Picture = LoadPicture(myvar)
i = i + 1
End Sub
Something thing is wrong when I replace ShowPic1 with Me.Controls("image" & i)
help me!!
ShowPic
End Sub
Sub ShowPic()
For i = 1 To 310
myvar = Application.WorksheetFunction _
.VLookup(Worksheets("sheet1").Range("b" & i + 1), Worksheets("sheet1").Range("B:O"), 14, False)
OLEObjects("image" & i).Picture = LoadPicture(myvar)
Me.Controls("image" & i).Picture = LoadPicture(myvar)
i = i + 1
End Sub
Something thing is wrong when I replace ShowPic1 with Me.Controls("image" & i)
help me!!