Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7701397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:58:33+00:00 2026-05-31T22:58:33+00:00

So I’m trying to make a combobox use a string that has other strings

  • 0

So I’m trying to make a combobox use a string that has other strings and has text too.
Like so:

Dim numbers() As String = {one, two, three, "four", "five"}
ComboBox1.text = numbers

I’m trying to use numbers more than once so I want everything to be in there. I tried using:

Dim numbers As String = (one or two or three or "four" or "five")

but that didn’t work either. Is there any way to make this possible? I looked all over the internet for help and all i got was array lists and conversions to strings. I’m Trying to make one line of code that has everything.

Edit: Let me rephrase that. I’m trying to do this:

Dim numbers As String = (one or two or three or "four" or "five")
ComboBox1.items.add(numbers)
If Combobox1.text = numbers Then
TextBox1.text = "is showing"
End if
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:58:35+00:00Added an answer on May 31, 2026 at 10:58 pm

    The first syntax you are using is creating an array. It is confusing what you are wanting as an end result, but if you are just wanting to join String’s and Text you can use & which is one of the VB Concatenation operaters.

    Dim numbers As String = one & two & three & "four" & "five"
    

    Edit base on further clarification. It sounds like you are wanting something like DataBinding. see if this code works for you.

     Dim numbers() As String = {one, two, three, "four", "Five"}
     ComboBox1.DataSource = numbers
    

    Try something like this
    You can create your string this way

    numbers = one & "," & two & "," & three & "," & "Four" & "," & "Five"
    

    or this way

    Dim temp() As String = {one, two, three, "Four", "Five"}
    numbers = String.Join(",", temp)
    

    Fill your ComboBox like LarsTech suggested.

    ComboBox1.Items.AddRange(numbers.Split(",", 5, StringSplitOptions.RemoveEmptyEntries))
    

    And check for a match like this

    Private Sub ComboBox1_TextChanged(sender As Object, e As System.EventArgs) Handles     ComboBox1.TextChanged
        If numbers.Contains(ComboBox1.Text) Then
            TextBox1.Text = "is showing"
        End If
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.