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
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
In Excel VBA you can use CCur(value) to convert any value to a currency $#,###.## format.
ASKER
Sorry, I should have told you it is a UserForm.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you!
np - hopefully it worked for you ( I was just wrote the code out from memory )