MsgBox when an Error occurs

Is there a way that I can have a message box display when an error is 
received while running a Macro?

Vick
0
Vick (9)
12/21/2005 8:39:03 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
615 Views

Similar Articles

[PageSpeed] 5

You need to trap the error and display the message. Example

Sub Test()
    On Error Goto errHandler
    'more code
    Exit Sub

errHandler:
    Msgbox "some message"
End Sub

-- 

HTH

RP
(remove nothere from the email address if mailing direct)


"Vick" <Vick@discussions.microsoft.com> wrote in message
news:DD79DEE4-52B6-4D7E-A69D-8F8E42A666E8@microsoft.com...
> Is there a way that I can have a message box display when an error is
> received while running a Macro?
>
> Vick


0
bob.phillips1 (6510)
12/21/2005 8:48:31 PM
Reply:

Similar Artilces:

Solution for WinZip Companion for Outlook 1.0 Unspecified Error
I have been running into a maddening error with WinZip Companion for Outlook 1.0. Online searches and diagnostic logging didn't reveal anything, so I emailed WinZip tech support. Below is my initial email and their response. The scenario (using Word as the Outlook 2003 email editor while running Adobe 6.0 Standard) applies for my user, so I'm going to try to upgrade to Adobe 7.0. Hope this post helps others. Cheers, Phil ================================ Frequently, when creating new emails, a user will get the following error message: WinZip Companion for Outlook Error 800004005 in ...

Unknown Error #2
What does"Procedure declaration does not match description of event or procedure having the same name" mean. I'm under Private Sub Worksheet_Calculate in VBA. The sub should look like this: Private Sub Worksheet_Calculate() The error message suggests that you've modified it in some way. -- Jim "aftamath" <aftamath@discussions.microsoft.com> wrote in message news:2D7F59C3-CE2D-42AB-AD6B-A198C0BF99AA@microsoft.com... | What does"Procedure declaration does not match description of event or | procedure having the same name" mean. I'm unde...

Getting File Version Info
I am trying to use the following command to get the version info of an specific file in Powershell: PS C:\> gc Servers.txt | foreach { [system.diagnostics.fileversioninfo]::GetVersionInfo \\$_\C$\windows\system32\drivers\storport.sys } However, I'm getting the following error: Unexpected token '\\$_\C$\windows\system32\drivers\storport.sys' in expression or statement. At line:1 char:126 + gc Servers.txt | foreach { [system.diagnostics.fileversioninfo]::GetVersionInfo \\$_\C$\windows\system32\drivers\storport.sys <<<< } + CategoryInfo ...

error code 0X899CC80
Tasl "Pop - Server.cfl.rr.com Sending repot error code (0X800CC80) None of the authentication method supported by the client are supported by the server "George Provencher" <George Provencher@discussions.microsoft.com> wrote in message news:CB829ACE-B166-463D-AE55-1BE1D86B513C@microsoft.com... > Tasl "Pop - Server.cfl.rr.com Sending repot error code (0X800CC80) None of > the authentication method supported by the client are supported by the > server And what does Road Riunner say when you contact them? -- Brian Tillman [MVP-Outlook] ...

Error CM_Transaction Bank reconciliation
My client tried to invalidate a miscellaneous check ... He received a message says that ... OPERATION to delete on table CM_Transaction do not work because the recording could not be lock. (Sorry my client works with French version...so I try to translate it) GP created a transaction in the General Ledger ...but the checkbook don't show that check with mention INVALIDATE. Someone could help me. Thanks, Nathalie ...

Error in CRM Outlook
Hello, When CRM Outlook is loaded, then the error message comes "failed to load CRM functionality. Please contact System Administrator". In the Outlook CRM options such as Track in CRM is disabled. Please help. Regards, Nitin "Nitin I" <NitinI@discussions.microsoft.com> wrote in message news:CB40BF5E-D667-4314-B926-A9926A3117AE@microsoft.com... > When CRM Outlook is loaded, then the error message comes "failed to load > CRM > functionality. Please contact System Administrator". In the Outlook CRM > options such as Track in CRM is disable...

Downloading Templates for Excel error with a windows error.
I have been trying for months to download some of the Excel templates of the Microsoft Office Online site but continually get an error message that Windows has encountered a problem and needs to close. The message is showing up after Excel has been opened and the active x download window has closed. I am using Excel 2000 with SP3 on Windows XP pro SP2. I also get the same error with Windows XP Home SP2. Any ideas on how to resolve this issue? Thanks, Lanie Moore ...

CRM error during Installation
Hello NG I try to install CRM 3 on a W3k Server. The SQL DB il located on an other W3k Server Now when I try to install CRM I receive the following error. 'SQLSERVERAGENT' (SQLSERVERAGENT) is not running on SERVER01 Why this error? How can I solve it? Thanks in advance for your help Ramon Lustrati Hi Ramon From what I can understand from your post I guess you need to start the SQLAGENT service on the SQL server, you can do this from services Hope that helps -- Alistair 2B.net http://www.crmdeployment.co.uk "Ramon Lustrati" wrote: > Hello NG > > I t...

Windows 2k3 Server / Exchange IS Startup Error
My Scenario looks like this: Root Domain Controller: AD (GC) + Exchange Server 2K3 SP1 Child Domain Controller: AD (GC) + Exchange Administration Tools. I ran the Forestprep in root Domain, the doamin preps in both ( Root and child domain) Now i got the problem, that if my root domain controller starts without child domain controller being up at this time, startup procedure (as well as shutdown procedure) takes significantly longer, and after this long duration it prompts the error message that "at least one service.." The eventlog says that the exchange services could not...

MsgBox and a pop up form
I have an application that pop up a form (vbModal) asking for password in order to proceed. It pops up after a period of idling. It works prettty well. The hassle comes when there is a MsgBox popping up and the user does not respond, then the modal form pop up. Now I got 2 modal things, and you cannot click anything to move on. I have been sidestepping the problem by disabling the modal form whenever I show msgbox. I am wondering if there is a better way to do this. "phil hunt" <a@abc.com> wrote in message news:i43f9i$k9b$1@speranza.aioe.org... >I have...

Creating label produces error msg
I am using Access 2007 for the first time for creating labels ... have used other versions of Access in the past. Create -> Labels -> 5160 (product number) Next -> Arial 10 Light Black Next -> add three lines of Name, Address, CityStZip Next -> no sort Next -> See labels Finish ... leads to an error msg: "Some data may not be displayed. There is not enough horizontal space on the page for the number of columns ....." It appears the Access Template for the 5160 is bad. Not sure how to fix this. It's possible that your printer has margins that are...

Report error #2
I get the following error when running a prefilter report in CRM 3.0 but in VS in runs fine Reporting Services Error -------------------------------------------------------------------------------- a.. An error has occurred during report processing. (rsProcessingAborted) Get Online Help a.. Cannot set the command text for data set 'Kunde'. (rsErrorSettingCommandText) Get Online Help a.. Error during processing of the CommandText expression of dataset 'Kunde'. (rsQueryCommandTextProcessingError) Get Online Help Here is the sql statement SELECT accountnumb...

remupd.exe error
Does anyone know what this file is? I just received an error that this file encountered a problem and must close. I have Outlook 2002. Tks! KDenton <anonymous@discussions.microsoft.com> wrote: > Does anyone know what this file is? I just received an > error that this file encountered a problem and must > close. I have Outlook 2002. A quick Google search turns up likely descriptions. -- Brian Tillman Smiths Aerospace 3290 Patterson Ave. SE, MS 1B3 Grand Rapids, MI 49512-1991 Brian.Tillman is the name, smiths-aerospace.com is the domain. I don't speak f...

CRM 4.0: Error while saving contact.
I have a clean deployment of CRM 4.0, and failed with below scenario: 1. Created a new account. (Account1) 2. Created another account and saved without closing. (Account2) 3. Clicked the Contacts tab on the navigation pane and created new contact (Contact A) 4. Saved and closed Contact A. No errors. 5. Opened Contact A. Changed Account2 to Account1 in Account lookup field. It gave me an error after saving: "No Attribute". This error also occurs when I try to add an existing Contact in the Account Screen. Below is the error details that i extracted from the Trace Log. Crm Exceptio...

Error Message #2
Every time I open up any excel file I get an error message in a pop up box from micorsoft visual basic that tells me "compile error in hidden module:AutoExecNew" and a help box and an OK box. The OK box allows the spreadsheet to open. The help box that a prtected module can't be displayed because the project is protected. How do I find out which 'project' has the 'module' and which module it is that has the error? When I close the spreadsheet a new box opens that says 'compile error in hidden module: DistMon '. I have searched for DistMon an...

offline error?
I'm using SBS2003 and CRM 1.2. Everything works wonderfully except the outlook offline feature. I keep getting an error indicating that it could not locate an entry in the sync database and it references "companyname_MSCRMDistribution". Any ideas? tks, Brandon is this the first client you have tried to go offline with? It may be worth tricking the SFO client to make it think you have never gone offline before. In outlook I assume you are online mode with CRM. Shut down outlook then make these registry changes to the client computers CRM registry then restart outlook and...

I got an error
Hi guys, I've created a simple webpage with a datagridview, my business object. If i try to modify a record i get an error on date value: Dettagli eccezione: System.InvalidOperationException: Impossible to convert the value of parameter 'DataNascita' from 'System.String' to 'System.DateTime'. What should I do? Thanks redbull wrote: > Hi guys, I've created a simple webpage with a datagridview, my business > object. > If i try to modify a record i get an error on date value: > > Dettagli eccezione: System.InvalidOperation...

Runtime error #17
I keep getting a "runtime error", Runtime Error! Program: C:/..... Abnormal program termination whenever trying to open an email message. Other functions of outlook work OK. Have tried repair under help. Any other suggestions? ...

Error code 0x64
what do i do to fix it . windows xp professional Microsoft .NET Framework 1.1 Service Pack 1 Security Update for Windows 2000, Windows XP, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 (KB953297) failed You see these KB articles: Description of the Patch Registration Cleanup Tool http://support.microsoft.com/kb/976220 When installing updates using Windows update or Microsoft Update you may receive Error 0x643 or 0x80070643 (23 Oct-09) http://support.microsoft.com/kb/976982 mootz wrote: > what do i...

Error ID 9046: Error <error code> deleting unused restricted view from folder
Hi, Our Exchange 2003 server is showing the following error every few days Error <error code> deleting unused restricted view from folder <folder id>. I have found the following on Technet http://www.microsoft.com/technet/support/ee/result.aspx? ProdName=Exchange&LCID=1033&EvtID=9046&EvtSrc=MSExchangeIS %20Mailbox%20Store&ProdVer=6.5.6940.0 However, this is obviously useless at resolving our issue. Any ideas would be greatly appreciated. Andrew Specterman MCSE MCSA MCP ...

Reminders error
I'm getting the following error each morning on two outlook clients of exchange: There was a problem reading one or more of your reminders. SOme reminders may not appear. There is not enough memory to peform the operation. Any ideas? ...

Table Import Errors
I was importing item vendor data to 3rd party user defined fields on the item vendor maintenance window using Table Import on GP8, and it keeps coming up with errors. The first time we ran it, it ran perfectly. The next time we tried it, to complete our update, it rejected almost every record, and created an error log without any sort of explanation of why they all got rejected. Does anyone know how to troubleshoot this issue? We tried importing from both a csv file and a tab delimited file, and both of these files have the same results. Also, we know that our fields are mapped co...

Error Message 0x8004210A #4
I am able to send emails, outlook is not able to receive any emails, as they are timed out. I have turned off spyware, firewall all security has been turned off. I have checked and rechecked the settings and changed the settings on the advanced tap to 3min.40 sec. as far as being timed out. My mail is being received on the server, which is accessable via the internet. I have had these issues in the past, however rebooting my computer previously which helped this issue in the past. This solution is not working this time. I received mail yesterday morning, and all of a sudden the incoming...

Error Message: Message #32760 missing
This issue happens everytime a user logs in to the system except for sa. If you click on the OK button nothing happens. Any ideas where this error comes from. Tried to seach KB but to no avail. Thanks, Yoyo Hi I have not seen this error before: have you tried running the Grant70.sql script file for all databases within the SQL Query Analyzer? -- Regards James[MVP] Visit MBS Blog Central http://mbscentral.blogs.com "Yoyo" <Yoyo@discussions.microsoft.com> wrote in message news:E7952DB4-596E-417C-AC7A-3DD5960745F6@microsoft.com... > This issue happens everytime ...

Sheet msgbox
I have a msgbox that I wish to appear when a sheet is active, I hav tried the code: Private Sub Workbook_SheetActivate But that doesnt seem to be working. Any ideas as to how to fix thi problem? Regards -- Message posted from http://www.ExcelForum.com Hi you need to put the code in the workbook module of your workbook. See http://www.cpearson.com/excel/events.htm for instructions -- Regards Frank Kabel Frankfurt, Germany > I have a msgbox that I wish to appear when a sheet is active, I have > tried the code: > Private Sub Workbook_SheetActivate > > But that doesnt se...