OFFXPDEV: Using the Code Commenter and Error Handler Add-in Can Cause Compilation Errors (292619)



The information in this article applies to:

  • Microsoft Office XP Developer

This article was previously published under Q292619

SYMPTOMS

Using the default "Code Commenter and Error Handler" template, CC_EH.eht, or the "Error Handler" template, ErrorHandler.eht, on your project can cause compilation errors.

CAUSE

The error handler portion of these templates contains two function calls that cause the solution not to compile. These are Call EnterProc("$$ProcedureAndModuleName") and Call ExitProc("$$ProcedureAndModuleName").

RESOLUTION

To correct this problem, delete the two function calls in CC_EH.eht and ErrorHandler.eht. To do so, follow these steps:
  1. Open the sample database Northwind.mdb.
  2. Press ALT+F11 to open Visual Basic Editor.
  3. On the Add-ins menu, click Code Commenter and Error Handler Add-in.
  4. Make sure the Template to apply box contains the path and file name for CC_EH.eht.
  5. When the Code Commenter and Error Handler template is loaded, click Edit to open the Code Commenter and Error Handler Template Editor.
  6. Remove the following two lines of code from template:
    Call EnterProc("$$ProcedureAndModuleName")
    Call ExitProc("$$ProcedureAndModuleName")
    					
  7. On the File menu, click Save, and then close the Code Commenter and Error Handler Template Editor.
  8. Repeat steps 3 through 7 for ErrorHandler.eht.
Another way to edit the template is to open the template with a text editor, such as Notepad, to make the changes.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

The "Code Commenter and Error Handler" and the "Error Handler" templates are used to add Code Comments and Error Handling routines into code modules.

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb.
  2. Press ALT+F11 to open the Visual Basic Editor.
  3. Open the Startup module.
  4. Place the mouse pointer within any function.
  5. On the Add-ins menu, click Code Commenter and Error Handler Add-in.
  6. In the Insert section, click the Current Procedure option, and then click Apply.
  7. On the Debug menu, click Compile Northwind.
Note that you receive compilation errors.

Modification Type:MajorLast Reviewed:5/9/2001
Keywords:kbbug KB292619