I am making a invoice program and I tried multiplying the number of times clicked which is in a text box and the price of the item which is is my resources. I already have the code to count how many times the button is clicked. Please Help!!
I am making a invoice program and I tried multiplying the number of times clicked which is in a text box and the price of the item which is is my resources. I already have the code to count how many times the button is clicked. Please Help!!
Thank you so much in advance!!
I need to multiply the number of times the button was clicked by the price which is in my resources.
Just make sure to convert the value in your text box to a numeric datatype using a conversion function. Since you are calculating prices, you might consider the CCur conversion function. Look in the VB help file for details on how to use it.
You might have to test the value in your textbox first to make sure it is a number, using the IsNumeric function. Again, details are available in the VB help file.
I am making a invoice program and I tried multiplying the number of times clicked which is in a text box and the price of the item which is is my resources. I already have the code to count how many times the button is clicked. Please Help!!
Thank you so much in advance!!
Thanks for that it helps a lot, but I'm a newbie and don't know anything about coding so could you guide me in the right direction of what the coding should be.
The Number of times clicked is "numberofcofee"
and the price is "My.Resources.cokeprice"
(The quotation marks is not apart of the code)
I am making a invoice program and I tried multiplying the number of times clicked which is in a text box and the price of the item which is is my resources. I already have the code to count how many times the button is clicked. Please Help!!
Thank you so much in advance!!
This is the code for counting how many times a button is pressed
Static hits1 As Integer
hits1 += 1
Numberofwater.Text = hits1.ToString("n0")
So far I don't have any code that works for multiplying. I understand that you won't write the code for me. Thanks for guiding me in the right direction though.
I am making a invoice program and I tried multiplying the number of times clicked which is in a text box and the price of the item which is is my resources. I already have the code to count how many times the button is clicked. Please Help!!
Thank you so much in advance!!
I though I had it this time, but when I press the button it ads two for some reason. Numberofcoke, numberofcoffee and numberofwater are how many times I press each button.
P.S. If you haven't already figured it out, this is a restaurant POS software. Dim str1 As String
Dim num1 As Integer
Dim str2 As String
Dim num2 As Integer
Dim str3 As String
Dim num3 As Integer
Dim str4 As String
Dim num4 As Integer
Dim str5 As String
Dim num5 As Integer
Dim str6 As String
Dim num6 As Integer
That's because you are using integer datatypes. You need to change the datatypes of num1, num2, etc. to something that supports a decimal point (like "Single" or "Double").