Type mismatch loading image from file

Whenever I run the following command:

Image1.Picture = App.Path & "\" & ListView1.SelectedItem.ListSubItems(3).Text

I get a type mismatch error on the "&" symbol.

Can someone help me figure out how to load an Image.picture with a file on my hard drive?
perksterAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
aikimarkConnect With a Mentor Commented:
try
Image1.Picture = LOADPICTURE(App.Path & "\" & ListView1.SelectedItem.ListSubItems(3).Text)
0
 
rspahitzCommented:
Yup...points to aikimark

The picture property is a picture object, not a string...the file path is a string, so you get a type mismatch.

To get a picture object, you need to "convert" the string, which is what LoadPicture does.
0
All Courses

From novice to tech pro — start learning today.