Home |
Search |
Today's Posts |
#1
|
|||
|
|||
VBA Error
Hi
On a UserForm everything works OK all the boxes fill with the correct information -- however on hitting enter the following error message appears. Division By Zero in the VBA the bottom line of the following code is highlighted Private Sub txtHrsTime_Change() Me.txtHrs2.Value = (Val(Trim(txtHrsTime.Text))) * 60 Me.txtVel2.Value = (Val(Trim(txtDis2.Text))) / (Val(Trim(txtHrs2.Text))) End Sub On viewing the sheet everything has been entered in the correct Cells -- this bug is really bugging me. Also how do you restrict the numbers after the decimal point in a Text Box. Any help much appreciated Cheers ---- Mully |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Ignore error msgs in formula references | Excel Discussion (Misc queries) | |||
Error trapped only while stepping through the code - Not triggered when run | Excel Discussion (Misc queries) | |||
Error trapped only while stepping through the code - Not triggered when run | Excel Discussion (Misc queries) | |||
Problem with VBA returning the contents of a long formula. | Excel Discussion (Misc queries) | |||
ERROR | Excel Discussion (Misc queries) |