Currency symbol in regional settings

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to capture the currency symbol from the windows regional
settings into a string in a visual basic.
Can that be done?
 
Take a look at what Randy Birch has at
http://vbnet.mvps.org/code/locale/localecurrency.htm

Note: Randy's site is aimed at VB programmers, not Access programmers. There
are some significant differences between what controls are available for
forms in VB vs. in Access. This example is one of them. The code uses a
control array, which Access doesn't support. Consequently, you will not be
able to simply copy Randy's code into your Access program.

If all you want is the currency symbol, though. copy the declarations at the
top of his code (everything before Private Sub Form_Load()), and copy the
entire GetCurrentLocaleInfo function from the end of his code.

To get the system currency symbol, use

GetCurrentLocaleInfo(GetSystemDefaultLCID(), LOCALE_SCURRENCY)

To get the user's currency symbol, use

GetCurrentLocaleInfo(GetUserDefaultLCID(), LOCALE_SCURRENCY)
 
Thank you so much...

Douglas J. Steele said:
Take a look at what Randy Birch has at
http://vbnet.mvps.org/code/locale/localecurrency.htm

Note: Randy's site is aimed at VB programmers, not Access programmers. There
are some significant differences between what controls are available for
forms in VB vs. in Access. This example is one of them. The code uses a
control array, which Access doesn't support. Consequently, you will not be
able to simply copy Randy's code into your Access program.

If all you want is the currency symbol, though. copy the declarations at the
top of his code (everything before Private Sub Form_Load()), and copy the
entire GetCurrentLocaleInfo function from the end of his code.

To get the system currency symbol, use

GetCurrentLocaleInfo(GetSystemDefaultLCID(), LOCALE_SCURRENCY)

To get the user's currency symbol, use

GetCurrentLocaleInfo(GetUserDefaultLCID(), LOCALE_SCURRENCY)
 
Back
Top