本文介绍了在ListBox选定的值中得到错误的计数.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在使用ListBox控件.当我选择多个值时,我只想将这些值存储在一个变量中.

但是,我的代码显示了所有计数值.

我只需要选择计数值.

有什么问题...?

看到我的代码
------------

Hi,
I am using ListBox controls. when i select the multiple values, just i want to store those values in one variables.

But,my code showing all the count values.

I need only selected count values.

what is the problem...?

see my code
------------

Dim PrjType As String
Dim _count As Integer = lstprojtype.Items.Count
If _count <> 0 Then
    For i As Integer = 0 To _count - 1
        PrjType = lstprojtype.Items(i).Value
    Next
End If
PrjType = Left(PrjType, Len(PrjType) - 2)

推荐答案


这篇关于在ListBox选定的值中得到错误的计数.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 15:10