Hi,

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
Sam

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.