Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am creating a cash register app. When the total button is hit, the subtotal, tax, and total is displayed in textboxes. I have this

I am creating a cash register app. When the total button is hit, the subtotal, tax, and total is displayed in textboxes. I have this code for the tax textbox (displays the tax amount). When I run it, I get an I get an InvalidCastException. Says that the conversion from string 'textbox' to type 'double' is not valid? Can anyone help? VISUAL BASIC PLEASE VISUAL BASIC PLEASEVISUAL BASIC PLEASE VISUAL BASIC PLEASEVISUAL BASIC PLEASE VISUAL BASIC PLEASEVISUAL BASIC PLEASE VISUAL BASIC PLEASEVISUAL BASIC PLEASE VISUAL BASIC PLEASE

Private Sub TextBox_tax_TextChanged(sender As Object, e As EventArgs) Handles taxBox.TextChanged If taxBox.Text.Length <> 0 Then Dim subtot As Double = subtotalBox.Text Dim tax As Double = taxBox.Text Dim taxamt As Double taxamt = (subtot * tax) / 100 Dim tot As Double tot = subtot + taxamt totalBox.Text = tot Else totalBox.Text = "" End If End Sub VISUAL BASIC PLEASE VISUAL BASIC PLEASEVISUAL BASIC PLEASE VISUAL BASIC PLEASEVISUAL BASIC PLEASE VISUAL BASIC PLEASEVISUAL BASIC PLEASE VISUAL BASIC PLEASE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

LO35.3 Describe how a bank can create money.

Answered: 1 week ago