Displaying an image from a listimage in a picturebox

wojtasik6

Registered User.
Local time
Today, 09:04
Joined
Apr 18, 2014
Messages
23
Hello guys!
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
Public Sub load_picture()
Code:
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 it should be from zero?
What am I doing wrong?
 

Users who are viewing this thread

Back
Top Bottom