rockchalk33
Board Regular
- Joined
- Jan 12, 2016
- Messages
- 111
Hey all so I had recently finished up a job and the recipient had emailed me and showed that there is a problem with my multiplication. I'm on my way to troubleshoot now but here's the issue. Assume a rate of $10/hour. There is a textbox to enter how many hours a particular person had worked. The Userform then takes the textbox value and multiplies it by the $10/hour rate and puts that product into column B. Obviously this is a variable range but below is an example of what the code looks like:
Range("B2") = TextBox1.Value * 10
Seems fairly straightforward except if this person works in half hour increments (example would be 10.5 hours)...the math doesn't recognize the 0.5 hour increment and would instead give a value of $100 instead of $105.
I am on my way to troubleshoot now, can anyone give a rough estimate as to what might be causing this problem?
Range("B2") = TextBox1.Value * 10
Seems fairly straightforward except if this person works in half hour increments (example would be 10.5 hours)...the math doesn't recognize the 0.5 hour increment and would instead give a value of $100 instead of $105.
I am on my way to troubleshoot now, can anyone give a rough estimate as to what might be causing this problem?