Adding file names in a combo

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ali Rizwan
    Banned
    Contributor
    • Aug 2007
    • 931

    Adding file names in a combo

    Hi all,
    I want to add all file names in a combo from a specific folder.
    Thanx
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    read all the file names in a loop and add to combobox
    or
    try to use FileListBox for the purpose.

    Comment

    • Ali Rizwan
      Banned
      Contributor
      • Aug 2007
      • 931

      #3
      Originally posted by debasisdas
      read all the file names in a loop and add to combobox
      or
      try to use FileListBox for the purpose.
      Thanx Debasis
      I know about filelistbox and i have used it many times but i want to use combo so that only one option will show at a time

      Thanx

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        Originally posted by Ali Rizwan
        Thanx Debasis
        I know about filelistbox and i have used it many times but i want to use combo so that only one option will show at a time

        Thanx
        then simply try this sample code

        [code=vb]
        Dim d As Integer
        d = File1.ListCount
        MsgBox d
        For i = 0 To d - 1
        Combo1.AddItem File1.List(i)
        Next i
        [/code]

        and make the filelistbbox hidden.

        Comment

        • QVeen72
          Recognized Expert Top Contributor
          • Oct 2006
          • 1445

          #5
          Originally posted by Ali Rizwan
          but i want to use combo so that only one option will show at a time
          Hi,

          Decrease the Height of File List Box, so that only one List Item is Visible at any given time... :)

          Regards
          Veena

          Comment

          Working...