Hello, my listbox contents output as 1 whole row like:

Total Normal = 3 Total High = 5 Total Low = 6

When i want the output to be formatted like:

Total Normal = 3
Total High = 5
Total Low = 6


Here is my code:

lstResults.Items.Add("Total Normal = " & sumNorm &
                             "Total High = " & sumHigh &
                             "Total Low = " & sumLow)

Any suggestions on how to make the output in such a format?

Recommended Answers

All 2 Replies

You want it added to three different lines, correct?

If so, you need to do this...

lstResults.Items.Add("Total Normal = " & sumNorm) 
    lstResults.Items.Add("Total High = " & sumHigh)
    lstResults.Items.Add("Total Low = " & sumLow)

thanks a lot!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.