Prev Previous Post   Next Post Next
  #1   Report Post  
mully
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ignore error msgs in formula references gharden Excel Discussion (Misc queries) 4 June 17th 05 12:14 AM
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 7 March 7th 05 06:29 PM
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 0 February 28th 05 06:26 PM
Problem with VBA returning the contents of a long formula. [email protected] Excel Discussion (Misc queries) 2 February 23rd 05 12:14 AM
ERROR Pinto1uk Excel Discussion (Misc queries) 1 February 8th 05 03:15 AM


All times are GMT +1. The time now is 02:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"