PC Review


Reply
Thread Tools Rate Thread

multi -selection list boxes

 
 
Theresa
Guest
Posts: n/a
 
      25th May 2004
I am trying to do a multi-selection list box it needs to
be done in VBA. I have never used VBA can anybody help?
Thanks
 
Reply With Quote
 
 
 
 
SA
Guest
Posts: n/a
 
      25th May 2004
Theresa:

What are you trying to do with a multi-select list box? Determine what is
selected? If so here's one way to approach the code:

Dim objCtrl as Control
Dim intCount as Integer, i as Integer
Set objCtrl = Me!MyListBoxControl
intCount = objCtrl.ListCount
For i = 1 to intCount 'Use intCount -1 if you have included row headers
If Ctrl.Selected(i) = True Then
'Do Something
End If
Next i

Another way is similar:

Dim objCtrl As Control
Dim objItem As Variant
Set objCtrl = Me!MyListBoxControl
For Each objItem In objCtrl.ItemsSelected
'Do Something
Next objItem

--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg


"Theresa" <(E-Mail Removed)> wrote in message
news:1208e01c4424e$b668a490$(E-Mail Removed)...
>I am trying to do a multi-selection list box it needs to
> be done in VBA. I have never used VBA can anybody help?
> Thanks



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dependant Multi-Selection List Boxes~HELP, I'm Stuck! karen Microsoft Access Forms 1 25th Jun 2008 12:52 AM
Multi Multi Select List boxes Simon Glencross Microsoft Access Macros 10 26th Jan 2006 06:19 PM
Multi Multi Select List boxes Simon Glencross Microsoft Access Forms 10 26th Jan 2006 06:19 PM
Multi Multi Select List boxes Simon Glencross Microsoft Access Queries 10 26th Jan 2006 06:19 PM
copying results from multi selection list boxes to cells =?Utf-8?B?UGFub3M=?= Microsoft Excel Programming 0 3rd Feb 2005 02:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:46 PM.