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 3306286
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:16:14+00:00 2026-05-17T21:16:14+00:00

Here is my code. for example TextBox1.Text= 12,34,45,67,67 Dim process_string As String() = TextBox1.Text.Split(New

  • 0

Here is my code.

for example TextBox1.Text= 12,34,45,67,67

            Dim process_string As String() = TextBox1.Text.Split(New Char() {","})
        Dim process As Integer

        For Each process In process_string 
            Combo1.Items.Add(process)
            count = count + 1
        Next process
      total_process.Text = count
    End If

    Dim array(count) As String
    Dim a As Integer
    For a = 0 To count - 1
        array(a) = Combo1.Items(a).ToString
    Next

    a = 0
    For a = count To 0
        Combo2.Items.Add(array(a).ToString)
    Next

i want to add values in reversed order in combobox2 that are available in combobox1
but when i run the application the second combobox remains empty and not showing any value.

  • 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-17T21:16:15+00:00Added an answer on May 17, 2026 at 9:16 pm

    2 things. First of all, K.I.S.S. Keep it simple stupid

        For i As Integer = ComboBox1.Items.Count - 1 To 0 Step -1
            ComboBox2.Items.Add(ComboBox1.Items(i))
        Next
    

    second: It didn’t work because you forgot the Step -1 on your last loop

    ~~~~~~~~~~~~~~Edit~~~~~~~~~~~~~~

    Sorting the data in a combo box should be done with the sorted property on a combo box

    ComboBox3.Sorted = True
    

    Sorting the data in reverse order should be done with arrays as you were trying to do before. The following code should suffice:

        Dim List As ArrayList = ArrayList.Adapter(ComboBox3.Items)
    
        List.Sort()
        List.Reverse()
    
        ComboBox4.Items.AddRange(List.ToArray)
    

    If you wanted to get creative, you could potentially create your own combo box class and make your own version of the sorted property that allows for “sort alpha”, “sort numeric”, “sort alpha Desc”, and “sort numeric desc” and perhaps some other options. But I’d only do that if you were going to use this in a lot of places.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is code example class A{ int i; public: A(int i) : i(i) {}
Just some example code here, but I have lists of strings that I want
Hi I have a code example available here: http://jsbin.com/oxoweh My problem is that I
I am developing a application using PHP. Some example code is here. $url =
Here's some example code: class Obj attr :c, true def == that p '=='
For example (in my case) here's some code, <?php woo_post_inside_before(); if ( $woo_options['woo_post_content'] !=
Here is the code in a function I'm trying to revise. This example works
For example, my goal is to test the code given here: PHP script that
To use a contrived example in Java, here's the code: enum Commands{ Save(S); File(F);
So, let's say I have this code (VB.Net): Sub Main() dim xxx as 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.