473,394 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Error handling code not working on my laptop

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
-----------------------------------------------------------------------------------------------------------
May 13 '07 #1
3 2310
JConsulting
603 Expert 512MB
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
-----------------------------------------------------------------------------------------------------------
Go into your VBA Tools/Options/General tab

Check the box settings there. Set to Break on unhandled errors.

J
May 13 '07 #2
Go into your VBA Tools/Options/General tab

Check the box settings there. Set to Break on unhandled errors.

J

thanks a million
May 13 '07 #3
JConsulting
603 Expert 512MB
thanks a million
Anytime
J
May 13 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Steve Battisti | last post by:
Hello all, I have .NET working swimmingly on my Win 2K laptop. I'm in the process of trying to get it working on my home PC, running Win XP Pro. IIS installed fine, .NET framework and the...
6
by: Squirrel | last post by:
I have a command button on a subform to delete a record. The only statement in the subroutine is: DoCmd.RunCommand acCmdDeleteRecord The subform's recordsource is "select * from tblVisit order...
14
by: David W. Fenton | last post by:
I'm no stranger to this error message, but I have a client who is experiencing it, but, fortunately, without any actual data corruption, and it's driving them made. Their inability to grasp that...
1
by: pHines | last post by:
I have my entire source code directory available on my laptop via Offline Files. The directory structure is housed on my server and made available offline on the laptop using Windows 2000. When I...
3
by: Mr Newbie | last post by:
I'm testing error handling configurations and having some trouble. I created a WebForm called. ErrDefault.aspx and I am trying to use the Page error attribute to force the redirection to a custom...
9
by: Gustaf | last post by:
I'm confused about structured error handling. The following piece of code is a simplification of a class library I'm working on. It works, and it does what I want, but I'm still not convinced that...
4
by: DavideR | last post by:
I have converted a large vb6 program with an add-in that for every routine gimme the error handling: the add-in adds one line on the head of the routine "if myerrhandle then ON ERROR GOTO...
1
by: Atia Amin | last post by:
Hi, I am a new member. Hello to every one. I am new in ASP.NET area. I wrote an ASP.NET web application which was running ok with my old laptop. Currently I have given a new laptop. Now I copied...
9
by: Trapulo | last post by:
Hello, with ASP.NET 2.0 Ajax every unexpected error is managed client-side with a popup that reports the error to the user. In ASP.NET 3.5 this behavor has been changed: how can I have a similar...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.