Return to VBA Code Examples

VBA CCur Function

CCur Description

Converts a value to currency.

CCur Syntax

In the VBA Editor, you can type  “CCur(” to see the syntax for the CCur Function:

The CCur function contains an argument:

Expression: Any string or numeric expression.

Examples of Excel VBA CCur Function

Sub CCur_Example()
    Dim cur1 As Currency
    Dim cur2 As Currency
    
    cur1 = CCur(12)
    cur2 = CCur(6.666666)
End Sub

After running the above VBA code, the variable cur1 = 12 and the variable cur2 = 6.6667.

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro - A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users! vba save as


Learn More!