Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27156

Struggling Student

$
0
0
Hello, I am a student , new to the programming world and am having a hard time with adding methods. How do I get my program to send the information entered into 2 text boxes to display in an error msgbox?

CurrentReading = txtCurrent.Text
PreviousReading = txtPrevious.Text
GallonsUsed = (CurrentReading - PreviousReading)
Total = (GallonsUsed * Rate)
lblGalUsed.Text = GallonsUsed
lblTotal.Text = Total.ToString("c2")

If txtCurrent.Text < txtPrevious.Text Then

MessageBox.Show("ERROR: Current reading ()can not be less than Previous reading() ",
"Invalid Input",
MessageBoxButtons.OK,
MessageBoxIcon.Error)

If txtCurrent.Text < txtPrevious.Text I need to get these input numbers displayed in the msgbox.

Any help greatly appreciated,,

Viewing all articles
Browse latest Browse all 27156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>