Link to home
Start Free TrialLog in
Avatar of ca1358
ca1358

asked on

Syntax for FormatCurrency

This is Excel VBA
I have this piece of code I need to add

FormatCurrency to this line in the code
(TextBox2.Text = rng(.ListIndex + 1, 3)

What would be the proper syntax?

Any help would greatly be appreciated

/////////////////////////////////////////////////////////
With ComboBox1
        Set rng = Range(.RowSource)
        TextBox1.Text = rng(.ListIndex + 1, 2)
       (TextBox2.Text = rng(.ListIndex + 1, 3)        
     End With
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

In Excel VBA you can use CCur(value) to convert any value to a currency $#,###.## format.
Avatar of ca1358
ca1358

ASKER

Sorry,  I should have told you it is a UserForm.

ASKER CERTIFIED SOLUTION
Avatar of Shane Russell
Shane Russell
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ca1358

ASKER

Thank you!
np - hopefully it worked for you ( I was just wrote the code out from memory )