Error handling code not working on my laptop

mukudu99

Registered User.
Local time
Today, 09:59
Joined
Dec 22, 2006
Messages
15
Hi everyone out there
I have a rather funny problem.
Error handling code routines do not seem to work on my laptop.
I still get the default error messages when i test.
One my desktop the code works just fine and i get the custom error messages
Actually i have tried five examples which are working on my desktop but not on my laptop. I tried fix and repair office but the problem still persists
thanks


here is an example:
--------------------------------------------------------------------------
Private Sub cmdAdd_Click()
On Error GoTo ErrorHandler

Dim x As Double
Dim y As Double
Dim z As Double

x = Me.txtFirst.Value
y = Me.txtSecond.Value
z = (Me.txtFirst.Value) + (Me.txtSecond.Value)

Me.txtResult.Value = z


CleanUpAndExit:
Exit Sub

ErrorHandler:
MsgBox "Numeric values please!!"
Resume CleanUpAndExit

End Sub
---------------------------------------------------------------------------
 
In VBE, Tools | Options - General tab, ensure Error Trapping is set to "Break on Unhandled Errors".
 
thanks a million
 

Users who are viewing this thread

Back
Top Bottom