Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default Select Whole List or Items in List Box

Hi all, I need macro on a button which can select all the items or
list in ListBox1. Please can any friend can help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Select Whole List or Items in List Box

Dim i As Long

With Me.ListBox1

.MultiSelect = fmMultiSelectExtended
For i = 1 To .ListCount

.Selected(i - 1) = True
Next i
End With


--
__________________________________
HTH

Bob

"K" wrote in message
...
Hi all, I need macro on a button which can select all the items or
list in ListBox1. Please can any friend can help.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default Select Whole List or Items in List Box

On Feb 18, 10:32*am, "Bob Phillips" wrote:
Dim i As Long

* * With Me.ListBox1

* * * * .MultiSelect = fmMultiSelectExtended
* * * * For i = 1 To .ListCount

* * * * * * .Selected(i - 1) = True
* * * * Next i
* * End With

--
__________________________________
HTH

Bob

"K" wrote in message

...



Hi all, *I need macro on a button which can select all the items or
list in ListBox1. *Please can any friend can help.- Hide quoted text -


- Show quoted text -


Thanks lot Bob.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default Select Whole List or Items in List Box

On Feb 18, 10:32*am, "Bob Phillips" wrote:
Dim i As Long

* * With Me.ListBox1

* * * * .MultiSelect = fmMultiSelectExtended
* * * * For i = 1 To .ListCount

* * * * * * .Selected(i - 1) = True
* * * * Next i
* * End With

--
__________________________________
HTH

Bob

"K" wrote in message

...



Hi all, *I need macro on a button which can select all the items or
list in ListBox1. *Please can any friend can help.- Hide quoted text -


- Show quoted text -


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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default Select Whole List or Items in List Box


"K" wrote in message
...
On Feb 18, 10:32 am, "Bob Phillips" wrote:
Dim i As Long

With Me.ListBox1

.MultiSelect = fmMultiSelectExtended
For i = 1 To .ListCount

.Selected(i - 1) = True
Next i
End With

--
__________________________________
HTH

Bob

"K" wrote in message

...



Hi all, I need macro on a button which can select all the items or
list in ListBox1. Please can any friend can help.- Hide quoted text -


- Show quoted text -


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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default Select Whole List or Items in List Box

On Feb 18, 2:18*pm, "Harald Staff" wrote:
"K" wrote in message

...
On Feb 18, 10:32 am, "Bob Phillips" wrote:





Dim i As Long


With Me.ListBox1


.MultiSelect = fmMultiSelectExtended
For i = 1 To .ListCount


.Selected(i - 1) = True
Next i
End With


--
__________________________________
HTH


Bob


"K" wrote in message


....


Hi all, I need macro on a button which can select all the items or
list in ListBox1. Please can any friend can help.- Hide quoted text -


- Show quoted text -


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 -


thanks Harald
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
Drop Down List - Select Multiple Items VLH Excel Worksheet Functions 14 October 16th 18 01:55 PM
Can I create a dropdown list to select multiple items Oct1196 Excel Worksheet Functions 2 September 5th 07 08:19 PM
Hi-lighting items in a multi-select List box Dan Excel Programming 6 June 4th 07 10:44 PM
select multiple items from a dropdown list Rebecca1 Excel Worksheet Functions 0 July 17th 06 08:47 PM
Create a macro to select items from an existing list .... Marc Excel Programming 3 January 6th 05 03:31 PM


All times are GMT +1. The time now is 03:29 PM.

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"