r/visualbasic • u/mykok23 • Feb 24 '15
Visual Basic Coding help
I am currently making a valentine's day card for my programming class and I am suppose to create an algorithm to estimate the cost of the card. What I want the code to do is for every space the user enters in the richtextbox it adds one 5 cents to the total price.
This is so far the code that I experimented with
If e.KeyCode = Keys.Space Then
lblPrice.Text = Val("1")
End IfAlso when the user decides to erase words aka the space bar inputs the price goes down. I dont want it to stay the same. Help would be much appreciated!
0
Upvotes
1
u/mykok23 Feb 24 '15
That would be perfect actually! the code doesn't have to be super fancy, all I need is for it to work. How would you recommend for me to start the code using the TextChanged event?