vba: regional settings for #N/A, #DIV/0! etc

xmlfan

New Member
Joined
Mar 24, 2011
Messages
5
Hi,
Excel 2007. I am working on a form that shows the value of cells in textboxes. It will be used in several countries, so TRUE must be WAAR in Dutch. No big issue for most datatypes. But values like #N/A and #DIV/0! keep me puzzled.
To get #N/A in a cell as the Dutch #N/B I use
[a1].value = CVErr(xlErrNA)
Works just fine. And now I can use
s = [a1].formulalocal
to get my Dutch #N/B into a string or textbox. So far so good.
But... now #N/A is in a cell as the result of a formula like lookup. Then I can't use formulalocal. Is there a simple way to retrieve #N/B ?
I tried things like Cstr(CVErr(xlErrNA)) but they give "Fout 2042", and I want "#N/B". Is there something I overlooked?
Thanks for reading and helping!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,224,564
Messages
6,179,547
Members
452,925
Latest member
duyvmex

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top