K K Feb 18, 2009 #1 Hi all, I need macro on a button which can select all the items or list in ListBox1. Please can any friend can help.
Hi all, I need macro on a button which can select all the items or list in ListBox1. Please can any friend can help.
B Bob Phillips Feb 18, 2009 #2 Dim i As Long With Me.ListBox1 .MultiSelect = fmMultiSelectExtended For i = 1 To .ListCount .Selected(i - 1) = True Next i End With
Dim i As Long With Me.ListBox1 .MultiSelect = fmMultiSelectExtended For i = 1 To .ListCount .Selected(i - 1) = True Next i End With
K K Feb 18, 2009 #3 Dim i As Long With Me.ListBox1 .MultiSelect = fmMultiSelectExtended For i = 1 To .ListCount .Selected(i - 1) = True Next i End With -- __________________________________ HTH Bob - Show quoted text - Click to expand... Thanks lot Bob.
Dim i As Long With Me.ListBox1 .MultiSelect = fmMultiSelectExtended For i = 1 To .ListCount .Selected(i - 1) = True Next i End With -- __________________________________ HTH Bob - Show quoted text - Click to expand... Thanks lot Bob.
K K Feb 18, 2009 #4 Dim i As Long With Me.ListBox1 .MultiSelect = fmMultiSelectExtended For i = 1 To .ListCount .Selected(i - 1) = True Next i End With -- __________________________________ HTH Bob - Show quoted text - Click to expand... Bob do you know that what sort of adjusment I should make in your macro if I want to select all the items or list in ListBox1 except the last item
Dim i As Long With Me.ListBox1 .MultiSelect = fmMultiSelectExtended For i = 1 To .ListCount .Selected(i - 1) = True Next i End With -- __________________________________ HTH Bob - Show quoted text - Click to expand... Bob do you know that what sort of adjusment I should make in your macro if I want to select all the items or list in ListBox1 except the last item
H Harald Staff Feb 18, 2009 #5 Dim i As Long With Me.ListBox1 .MultiSelect = fmMultiSelectExtended For i = 1 To .ListCount .Selected(i - 1) = True Next i End With -- __________________________________ HTH Bob - Show quoted text - Click to expand... Bob do you know that what sort of adjusment I should make in your macro if I want to select all the items or list in ListBox1 except the last item For i = 1 To .ListCount - 1 HTH. Best wishes Harald
Dim i As Long With Me.ListBox1 .MultiSelect = fmMultiSelectExtended For i = 1 To .ListCount .Selected(i - 1) = True Next i End With -- __________________________________ HTH Bob - Show quoted text - Click to expand... Bob do you know that what sort of adjusment I should make in your macro if I want to select all the items or list in ListBox1 except the last item For i = 1 To .ListCount - 1 HTH. Best wishes Harald
K K Feb 18, 2009 #6 Bob do you know that what sort of adjusment I should make in your macro if I want to select all the items or list in ListBox1 except the last item For i = 1 To .ListCount - 1 HTH. Best wishes Harald- Hide quoted text - - Show quoted text - Click to expand... thanks Harald
Bob do you know that what sort of adjusment I should make in your macro if I want to select all the items or list in ListBox1 except the last item For i = 1 To .ListCount - 1 HTH. Best wishes Harald- Hide quoted text - - Show quoted text - Click to expand... thanks Harald