98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Currencies in VBA
Currencies in VBA
Resolved · Low Priority · Version 2003
Neil has attended:
Excel VBA Advanced course
Currencies in VBA
How do I fix the currency, so that someone gets the correct currency when they open my spreadsheet, even if their default currency is different?
RE: Currencies in VBA
Hi Neil
Thank you for your question.
I would suggest you create a procedure that runs when the worksheet opens. You could prompt the user to enter their name, or some other method of identification.
You could then use a select case statement to assign the relevant formatting.
The following code sets the selection to currency and then changes the symbol to the Euro
Selection.Style = "Currency"
Selection.NumberFormat = _
"_-[$€-2] * #,##0.00_-;-[$€-2] * #,##0.00_-;_-[$€-2] * ""-""??_-;_-@_-"
Note the key marker which sets the currency value to euro.
Regards
Stephen
RE: Currencies in VBA
Hi Neil
Thank you for your question.
I would suggest you create a procedure that runs when the worksheet opens. You could prompt the user to enter their name, or some other method of identification.
You could then use a select case statement to assign the relevant formatting.
I have attached a text document that contains the code required to format a number as currency in euros
Regards
Stephen
Attached files...
Thu 4 Dec 2008: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Applying and removing border from cell in Excel 2010Did you know the shortcut key for applying and removing the outline border for a cell? |