format currency

M

mf

Does anyone know why Formatcurrency in VBA for Excel 2000 on a PC can
work just fine, but in VBA for Excel 2004 on a MAC is a problem?
 
M

Mike Middleton

mf -

VBA on Mac Excel 2004 is pretty much equivalent to VBA on Windows Excel 97.

VBA on Windows Excel 97 does not include FormatCurrency.

I still use Windows Excel 97 to develop add-ins that are likely to work on
both Windows and Mac platforms, and I also do extensive testing on all
versions to verify compatibility.

- Mike
http://www.mikemiddleton.com
 
C

CyberTaz

Hi Mike - I'm admittedly out of my league here, but - just as a learning
experience - could a suitable workaround be to use the Style property
(Style.Name) to apply a Style by the name of Currency (or whatever)?

Regards |:>)
Bob Jones
[MVP] Office:Mac
 
M

Mike Middleton

Bob -

Yes, Sytle = "Currency" might be one workaround, if you want what
corresponds to the Currency button on the Format toolbar.

Another would be NumberFormat = "$#,##0.00" or whatever, corresponding to
Format | Cells | Number | Currency.

(These two methods generally yield slightly different results, particularly
with regard to the spacing of the currency symbol and other spacing
surrounding the formatted results. I usually prefer the NumberFormat
results.)

The newer FormatCurrency function uses the currency symbol defined in the
system control panel on Windows computers, and the position of the currency
symbol is determined by the system's regional settings.

The appropriate workaround depends on what the Original Poster's esthetic
sense.

- Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top