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 total box. 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

Step: 3

blur-text-image

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions