Hi, wondering if anyone could help me with this.
I need to create a program that contains a listbox (lstChart), calculate and exit button.
When the user clicks the calculate button it needs to display 5 separate input boxes asking for the total sales for each of the 5 stores.
On top of that, whatever number the user enters needs to be divided by 100 and converted to an asterisk representing 100 dollars each.
Here's what I have so far, and I'm very new to programming. Any help is greatly appreciated!

Dim intCount As Integer = 1
        Dim intStore As Integer
        Dim strStars As String
        Dim intDividedBy As Integer


        intDividedBy = intStore / 100
        strStars = CInt(intDividedBy)

        Do
            intStore = CInt(InputBox("Enter the sales for store number " & intCount.ToString()))
            intCount = intCount + 1
            lstChart.Items.Insert(0, "Store 1:" & strStars.ToString)
            strStars = intDividedBy.ToString("*")
        Loop While intCount <= 5

By I know this code is very , VERY sloppy and some of it probably doesn't even make sense. I'm very new to this I don't fully understand a lot about VB.

Netcode commented: if its simple then solve it -1

Apologies for not wrapping the code xD

Would you like the total of the 5 total sales? You will need to add these up before you convert to string including a result variable.

total = total + intStore

Post your error, what to you want to fix/improve here?

Dim intCount As Integer = 1
    Dim intStore As Integer
    Dim strStars As String
    Dim intDividedBy As Integer
     
     
    intCount = 0 
    Do
      intCount = intCount + 1
      intStore = CInt(InputBox("Enter the sales for store number " & intCount.ToString()))
      intDividedBy = intStore /100
      strStars = intDividedBy.tostring & "*"
      lstChart.Items.Insert(0, "Store " & intCount.ToString & ": " & strStars)
    Loop While intCount < 5

**Dim intCount As Integer = 1
Dim intStore As Integer

Dim strStars As String
Dim intDividedBy As Integer

for intcount= 1 to 100
next

intStore = CInt(InputBox("Enter the sales for store number " & intCount.ToString())) intDividedBy = intStore /100 strStars = intDividedBy.tostring & "*" lstChart.Items.Insert(0, "Store " & intCount.ToString & ": " & strStars)**

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.