Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Help with displying string variable in Combobox using VB.BET

Posted on 2013-10-26
4
Medium Priority
?
274 Views
Last Modified: 2013-10-27
Hi,

If I  have a string variable S = BEL,CAN,FRA,USA

How do I display the values in a combobox as shown below? My string will vary, just using values in S as an example.

BEL
CAN
FRA
USA

Thanks,

Victor
0
Comment
Question by:vcharles
  • 3
4 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 39603491
Use Split() and AddRange() like this:
Dim S As String = "BEL,CAN,FRA,USA"
ComboBox1.Items.AddRange(S.Split(","))

Open in new window

0
 

Author Comment

by:vcharles
ID: 39603492
Thanks, Is it possible to view the same data in a Grid?
0
 

Author Comment

by:vcharles
ID: 39603493
I meant the DataGrid that comes with VS2010
0
 

Author Closing Comment

by:vcharles
ID: 39603762
Thank You.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question