Microsoft KB Archive/229393

= OFF2000: Run-Time Error 13 Coercing Euro Symbol to Currency Data Type =

Article ID: 229393

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition
 * Microsoft Access 2000 Standard Edition
 * Microsoft FrontPage 2000 Standard Edition
 * Microsoft Outlook 2000 Standard Edition
 * Microsoft PowerPoint 2000 Standard Edition
 * Microsoft Publisher 2000 Standard Edition
 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q229393



SYMPTOMS
The following error message may appear when your macro evaluates a statement that uses the euro symbol:

Run-time error '13':

Type mismatch



CAUSE
This error message occurs when the following conditions are true:
 * Your macro attempts to coerce a statement that uses the euro symbol to the Currency data type.

-and-
 * The default currency symbol for your operating system is something other than the euro symbol.

For example, if your default currency symbol is the dollar sign ($), the following macro statements cause the error message described in the "Symptoms" section.

Example 1: Coercing Data Types Using Ccur Function
Ccur ("€125")

Example 2: Coercing Variable Using Currency Data Type
Dim cEuro as Currency cEuro = "€123.45"



RESOLUTION
To correct this issue, set the default currency symbol for Microsoft Windows to the euro symbol:
 * 1) On the Start menu, point to Settings, and then click Control Panel.
 * 2) In Control Panel, double-click the Regional Settings icon.
 * 3) Click the Currency tab.
 * 4) Click the Currency symbol box, and type ALT+0128 on the numeric keypad.
 * 5) Click OK to change the default currency symbol to the euro.



MORE INFORMATION
The Ccur function in Microsoft Visual Basic for Applications coerces, or forces, an expression into the Currency data type. Additionally, when you dimension a variable to a specific data type, you also coerce an expression to that particular data type. For example, to coerce the expression "$456.78" to the Currency data type you could use either of the following statements: Ccur ("$456.78")

-or-

Dim sVal as Currency sVal = "$456.78" However, when you try to coerce an expression that contains the euro currency symbol, a run-time error occurs if the default currency symbol for Microsoft Windows is not set to the euro symbol.

