visual basic

sameerasawant
sameerasawant used Ask the Experts™
on
hello
i want to put one control.which is having left side check box.so i can select multiple row by cliking check box & put into another grid.
i don't know which controll i can use.
pls tell me vb contol.and also if possible code also.
thank u very much

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
you can use list box, but you have to set its Sytle property to 1-CheckBox
You can cycle through the listbox looking for the checked items such as:

    Dim lListLoop As Long
    If List1.SelCount > 0 Then
        For lListLoop = 0 To List1.ListCount - 1
            If List1.Selected(lListLoop) = True Then
                MsgBox List1.List(lListLoop) & " was selected"
            End If
        Next
    Else
       MsgBox "Nothing selected"
    End If
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept twalgrave's comment as answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

FaithRaven
EE Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial