Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2005
    Posts
    62

    Angry Unanswered: simple (hopefully) Listbox select problem

    Hello,

    I have a list box where I populate options, say
    (1)
    (2)
    (3)
    (4)

    and I need to make vba select certain option (ie. say (2) and (4) dynamically)

    I have a loop that determines which option should be selected, but I cant seem to use the listbox.Selected(item) property to select specific options with vba. (there is no error, it just doesnt select the options I need it to select) Any Ideas?



    code:
    Code:
    For intCounter = 0 To listCounties.ListCount - 1
                         
                If (Val(listCounties.ItemData(intCounter)) = Val(countiesRecordSet.Fields(0))) Then
              
                    listCounties.Selected(intCounter) = True
                    
              End If
                
            Next intCounter

    Thanks

  2. #2
    Join Date
    Aug 2005
    Posts
    62
    anyone?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •