![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Mar 2008
Posts: 35
Rep Power: 0
![]() |
Array
hi there.... how are you guys??
could somebody help to correct my code??? i have a problem for displaying arrays in the list box here is the code Public Class Form1
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
ErrorProvider1.Clear()
Dim total As Decimal
Dim sales As Decimal
Dim flag As Boolean
flag = False
sales = Val(txtSales.Text)
total = 200 + (0.09 * sales)
txtSalary.Text = total.ToString
If (txtSales.Text = "") Then
ErrorProvider1.SetError(txtSales, "You shoulde enter the sales")
flag = True
txtSalary.Text = ""
End If
End Sub
Private Sub btnTotal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTotal.Click
Dim salary As Integer
Dim survey(0 To 8) As Integer
ListBox1.Items.Add("Salary Range:" + " " + "Total:")
ListBox1.Items.Add(salary.ToString)
Select Case salary
Case 200 To 299
survey(0) += 1
Case 300 To 399
survey(1) += 1
Case 400 To 499
survey(2) += 1
Case 500 To 599
survey(3) += 1
Case 600 To 699
survey(4) += 1
Case 700 To 799
survey(5) += 1
Case 800 To 899
survey(6) += 1
Case 900 To 999
survey(7) += 1
Case Is > 100
survey(8) += 1
End Select
End Sub
End Classand this is what it shows ![]() how can i display all of them?? |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Array Sorting | grimpirate | Software Design and Algorithms | 18 | Jan 24th, 2008 9:04 PM |
| dynamic array help | quickster12 | C++ | 4 | Nov 29th, 2007 11:52 PM |
| problem processing file into a char array | csrocker101 | C++ | 1 | May 8th, 2007 11:50 PM |
| changing size of an array | Eric the Red | Java | 3 | Apr 3rd, 2006 8:19 PM |
| Installing IPB 2.03 | bh4575 | Other Web Development Languages | 0 | Apr 23rd, 2005 2:36 AM |