Results 1 to 2 of 2

Thread: Adding Items to combo

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2007
    Location
    Merced
    Posts
    868

    Adding Items to combo

    Is there a way where I can read from a file and add each line of the file to a combo control?

  2. #2
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Adding Items to combo

    Like this perhaps
    Code:
    Dim strLine As String
    Dim intFile As Integer
    intFile = FreeFile
    Open "C:\MyFile" For Input As intFile
    Do Until EOF(intFile)
        Line Input #intFile, strLine
        cmbCombo.AddItem strLine
    Loop
    Close intFile

Posting Permissions

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



Click Here to Expand Forum to Full Width