0

I get the following error message:

Compile error:
Can't assign to read-only property

when trying to assign Multiselect to my FileListBox(File1). I used the following code:

File1.ReadOnly = False

File1.MultiSelect = 2

Do anybody know what is wrong!

best regards Kristian

3
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by krille
0

Hi, I think error form the line File1.MultiSelect = 2 because MultiSelect property is read only at Runtime. that is you can set it at design time only.

0

Okej. I'm not kind of new i vb. What can I do to solve the problem.

0

Ok, one solution is to have two FileListboxes. One with Multiselect = 1 (design time). and another with MultiSelect = 2 (Designtime). When user change the property you swap the visibility of the FileListBoxes.

But it is redundant.

0

what do you need it for?? As far as i know i can multiselect items and do corresponding events without any issues

0

I just want to select and then open more then one file in the FileListBox

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.