I have a relatively large application with multiple forms and a Module class.

The problem I am having is that when I create a listbox on ANY form and try to use its 'Selected' function eg. List1.Selected vb automatically changes it to List1.selected

Can anyone tell me why this is? and how to fix it.

Before I knew that there was a 'Selected' function with listboxes I started to use selected as a string variable, but I did not declare selected as a Dim String variable or Global String variable anywhere in my application.

Thanks in advance

7 Years
Discussion Span
Last Post by vb5prgrmr

Tools>Options>Editor Tab>Put check next to require variable declaration>click ok.

Just like if you...
Dim I As Integer
In a lot of subs for looping but then make the mistake of doing

Dim i As Integer
Someplace, they all change to the lower case

Glad you have posted this thread as solved which I hope means you have this figured out.

Good Luck

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.