Microsoft KB Archive/292619

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

Article ID: 292619

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Office XP Developer Edition

-



This article was previously published under Q292619



SYMPTOMS
Using the default &quot;Code Commenter and Error Handler&quot; template, CC_EH.eht, or the &quot;Error Handler&quot; 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(&quot;$$ProcedureAndModuleName&quot;) and Call ExitProc(&quot;$$ProcedureAndModuleName&quot;).



RESOLUTION
To correct this problem, delete the two function calls in CC_EH.eht and ErrorHandler.eht. To do so, follow these steps:  Open the sample database Northwind.mdb. Press ALT+F11 to open Visual Basic Editor. On the Add-ins menu, click Code Commenter and Error Handler Add-in. Make sure the Template to apply box contains the path and file name for CC_EH.eht. When the Code Commenter and Error Handler template is loaded, click Edit to open the Code Commenter and Error Handler Template Editor.  Remove the following two lines of code from template: Call EnterProc(&quot;$$ProcedureAndModuleName&quot;) Call ExitProc(&quot;$$ProcedureAndModuleName&quot;) </li> On the File menu, click Save, and then close the Code Commenter and Error Handler Template Editor.</li> Repeat steps 3 through 7 for ErrorHandler.eht.</li></ol>

Another way to edit the template is to open the template with a text editor, such as Notepad, to make the changes.

<div class="status_section">

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

<div class="moreinformation_section">

MORE INFORMATION
The &quot;Code Commenter and Error Handler&quot; and the &quot;Error Handler&quot; 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.

Additional query words: pra

Keywords: kbbug kbnofix KB292619

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.