I need help fixing these errors in my visual basic homework

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

I need help fixing these errors in my visual basic homework

Post by answerhappygod »

I need help fixing these errors in my visual basic homework
I Need Help Fixing These Errors In My Visual Basic Homework 1
I Need Help Fixing These Errors In My Visual Basic Homework 1 (123.42 KiB) Viewed 30 times
monthlyBills.txt VB Electricity Project 2 B1 1 3 4 ▼ 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 26 27 28 29 30 31 32 33 34 35 100% Error List Entire Solution Application. Designer.vb Error List Output Public Class frmMain Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click Dim FILE_NAME As String = "monthlyBills.txt" Dim totalBillAmount As Double = 0 Dim averageBillAmount As Double = 0 Dim NUM_MONTHS As Integer = 12 Dim txtBill As String Else If System.IO.File. Exists(FILE_NAME) = True Then Dim fileReader As New System.IO.StreamReader(FILE_NAME) Do While fileReader. Peek() <> -1 txtBill= fileReader.ReadLine() totalBillAmount = totalBillAmount + Double.Parse(txtBill) Form1.vb* X Form1.vb [Design]* End If End Sub Loop End Sub ✔ No issues found averageBillAmount = totalBillAmount / NUM_MONTHS lblAvgBill.Text = "$" + average BillAmount.ToString("N2") End Class MessageBox.Show("File Does Not Exist") btnExit Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click frmMain. Active Form.Close() Code Description > BC30456 'Form1' is not a member of 'Electricity_Project_2'. ▷ ▸ IDE0059 Unnecessary assignment of a value to 'averageBillAmount' 1 Error A 0 Warnings ● 1 Message Build + IntelliSense - Click Ln: 32 File Ch: 5 Search Error List Project Electricity Projec... Application.Desi... 35 Electricity Projec... Form1.vb 6 SPC CRLF - д х D- Line Suppress Active Active
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply