Hello. I really appreciate your answer. I have definitely gotten somewhere, but I am confused on how to code the rest. I also do not understand how to use the Array class in VB. An array is a line of code? This is what I have so far. I assume that prices in (prices.Length) is underlined green because I have not declared its value supposedly within the array? It states it is not assigned a value when I hover over it. My screenshot will show my coding form. There are also txtTotalItems_TextChanged and txtTotalSales_TextChanged missing from the screenshot at the end. I opened all pieces of the design form just to show what I named my labels and text boxes. I have 3 labels, Total Sales, Average Sale Price, and Total Items as well as three text boxes below each of those labels that have the exact same name. The text boxes' purpose is to showcase the values, however I do not know if this is correct and do not know where the array is going to go. I have a text box for the user to enter the prices, and two buttons, one the Submit Price button and one the Exit button.
Hello. I really appreciate your answer. I have definitely gotten somewhere, but I am confused on how to code the rest. I also do not understand how to use the Array class in VB. An array is a line of code?
This is what I have so far. I assume that prices in (prices.Length) is underlined green because I have not declared its value supposedly within the array? It states it is not assigned a value when I hover over it. My screenshot will show my coding form. There are also txtTotalItems_TextChanged and txtTotalSales_TextChanged missing from the screenshot at the end. I opened all pieces of the design form just to show what I named my labels and text boxes. I have 3 labels, Total Sales, Average Sale Price, and Total Items as well as three text boxes below each of those labels that have the exact same name. The text boxes' purpose is to showcase the values, however I do not know if this is correct and do not know where the array is going to go. I have a text box for the user to enter the prices, and two buttons, one the Submit Price button and one the Exit button.
![1
2
FWN
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
1 reference
Public Class FrmMain
O references
Private Sub btnExit_Click(sender
Me.Close()
1
End Sub
O references
Private Sub btnSubmit Price_Click(sender As Object, e As EventArgs) Handles btnSubmitPrice. Click
Dim prices() As Double
Declare an array to store prices
¹ Add the value entered in the TextBox to the array
ReDim Preserve prices (prices.Length)
prices (prices.Length - 1) = CDbl(txtPrices. Text)
End Sub
Object, e As EventArgs) Handles btnExit.Click
O references
Private Sub FrmMain_Load(sender As Object, e As EventArgs) Handles MyBase. Load
1
End Sub
O references
Private Sub lblAvgSale Price_Click(sender As Object, e As EventArgs) Handles lblAvgSalePrice. Click
1
End Sub
O references
Private Sub lblTotalSales_Click(sender As Object, e As EventArgs) Handles lblTotalSales. Click
End Sub
O references
Private Sub lblTotalItems_Click(sender As Object, e As EventArgs) Handles lblTotalItems.Click
1
End Sub
O references
Private Sub txtPrices_TextChanged(sender As Object, e As EventArgs) Handles txtPrices. TextChanged
1
End Sub
O references
Private Sub txtAvgSale Price_TextChanged(sender As Object, e As EventArgs) Handles txtAvgSale Price. TextChanged
1
End Sub](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6401ea27-421d-498c-85f3-4b9d8126b850%2Fc1f114ef-3b80-40f5-a636-d2bee2713604%2Felfo26j_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)