Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Selecting all items in a Listbox???

Hi,

Livvo is asking if I can get a multi-select listbox to select all items in
the box at the click on a button on the form.

Anybody know how to do this?

Ta
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Selecting all items in a Listbox???

Private Sub CommandButton1_Click()
Dim i as integer
For i = 0 To ListBox1.ListCount - 1
ListBox1.Selected(i) = True
Next i
End Sub


--
Hope that helps.

Vergel Adriano


"Neily" wrote:

Hi,

Livvo is asking if I can get a multi-select listbox to select all items in
the box at the click on a button on the form.

Anybody know how to do this?

Ta

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Selecting all items in a Listbox???

Private Sub CommandButton1_Click()
Dim i As Integer
For i = 0 To ListBox1.ListCount - 1
ListBox1.Selected(i) = True
Next i
End Sub

--
Hope that helps.

Vergel Adriano


"Neily" wrote:

Hi,

Livvo is asking if I can get a multi-select listbox to select all items in
the box at the click on a button on the form.

Anybody know how to do this?

Ta

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Selecting all items in a Listbox???

Brilliant, Ta.

"Vergel Adriano" wrote:

Private Sub CommandButton1_Click()
Dim i As Integer
For i = 0 To ListBox1.ListCount - 1
ListBox1.Selected(i) = True
Next i
End Sub

--
Hope that helps.

Vergel Adriano


"Neily" wrote:

Hi,

Livvo is asking if I can get a multi-select listbox to select all items in
the box at the click on a button on the form.

Anybody know how to do this?

Ta

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting multiple items on Listbox Rahul_Uk Excel Programming 2 April 20th 06 05:29 PM
1. Selecting multiple items from drop listbox kurb Excel Programming 0 October 16th 04 09:01 PM
Selecting Multiple items in ListBox Dave Peterson[_3_] Excel Programming 0 August 26th 04 01:33 AM
Selecting multiple items and columns from ListBox TK Excel Programming 0 August 25th 04 01:19 AM
Adding Items to a ListBox-Unique Items Only jpendegraft[_14_] Excel Programming 2 May 2nd 04 02:27 AM


All times are GMT +1. The time now is 03:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"