The typcail code in Excel VBA doesn't work in Word. How can I take a number in a TextBox in a UserForm and round it UP to 0.5 (ie: "1.2" becomes "1.5").
The following example codes didn't work:
TextBox1.Value = Round(TextBox2.Value * 0.03, 0.5)
TextBox1.Value = Round((TextBox2.Value * 0.03) / 0.5, 0) * 0.5
TextBox1.Value = -Int(-(TextBox2.Value * 0.03) * 0.5 / 0.5)
TextBox1.Value = -Int(-(TextBox2.Value * 0.03) * 2 / 2)
The following example codes didn't work:
TextBox1.Value = Round(TextBox2.Value * 0.03, 0.5)
TextBox1.Value = Round((TextBox2.Value * 0.03) / 0.5, 0) * 0.5
TextBox1.Value = -Int(-(TextBox2.Value * 0.03) * 0.5 / 0.5)
TextBox1.Value = -Int(-(TextBox2.Value * 0.03) * 2 / 2)