Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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

View products that this article applies to.


The following error message may appear when your macro evaluates a statement that uses the euro symbol:
Run-time error '13':

Type mismatch

↑ Back to the top


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.

  • 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"

↑ Back to the top


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.

↑ Back to the top

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")
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.

↑ Back to the top


For more information about how to coerce currency data types, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type Type Conversion Functions in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top

Keywords: kbnosurvey, kbarchive, kberrmsg, kbprb, kbpending, KB229393

↑ Back to the top

Article Info
Article ID : 229393
Revision : 6
Created on : 2/28/2014
Published on : 2/28/2014
Exists online : False
Views : 348