Displaying an image from a listimage

wojtasik6

Registered User.
Local time
Today, 04:54
Joined
Apr 18, 2014
Messages
23
Hello!
I want to display a picture (or pictures) from Imagelist in the picturebox (KIBES_picture).But I am getting a type mismatch error in the last line. What am I doing wrong?
Code:
Public Sub load_picture() 

Dim iml As ImageList
Set iml = New ImageList
iml.ListImages.Add , , LoadPicture("K:\Kapa-Planung Elektrik\Kibes_Database\Aufbausystemme\02_Innenbeleuchtung\00.00000-0002_Treppebeleuchtung_ueber_2 Schalters_087A00\ekran_edycja.jpg")

[Forms]![Search]![KIBES_picture].Picture = iml.ListImages(1)

Besides, when I have Listimage(0) I am getting an other error: Index out of bounds. Strange, because the index should start from zero?
 

Users who are viewing this thread

Back
Top Bottom