CODE
Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
Dim intCount As Integer
Dim decSales As Decimal
Dim strInput As String
intCount = 1
Do While intCount <= 5
strInput = InputBox("Enter today's sales for Store " & intCount.ToString, "Today's Sales")
If strInput <> "" Then
If IsNumeric(strInput) Then
decSales = CDec(strInput)
intCount += 1
lstOutput.Items.Add(Store(decSales))
Else
MessageBox.Show("Please enter a valid number for the sales amount.", "Error")
End If
Else
Exit Do
End If
Loop
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
Function Store(ByVal decSales As Decimal)
End Function
Hi, I'm having some trouble with this homework problem. I've gotten the first part but I'm lost on the next
The problem is: Write a program that asks user to enter today’s sales for five stores. The program should then display a bar graph comparing each store’s sales. Create each bar in the bar graph by displaying a row of asterisks in a listbox. Each asterisk should represent $100 of sales. The prompt should be in a loop. Also, create and call a funciton to return a string of asterisks. Pass the sales amount to the function. I'm unsure of how to write a function to return asterisks. Also, I'm using VB 05 express edition. Anyone able to point me in the right direction on how to go about writing the function?