Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB code, need to load a drop dpown list with a List(Of String)

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
Can't find anything about how to do this in VB.
I think there is a way to load the drop down just by passing the list and not looping?
I want to sort the items A-Z which is why I'm doing this.

Code:
            'load table names, in order to sort
            Dim TableNames As New List(Of String)
            TableNames.Add("Choose...")
            TableNames.Add("SOWTimeReporting")
            TableNames.Add("SOWVendors")
            TableNames.Add("SOWLog")
            TableNames.Add("SPMID")
            TableNames.Add("SOWTimesheet")
   
            'load list into drop down
            'Me.ddlTableNames.Items.Add(TableNames)
            For a = 1 To UBound(TableNames)   ' <<<< Issue here


            Next
[/code

DougP
 
This is the ASP board, so for server-side vBScript, I would suggest that forum222 is where you actually need to be.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top