Home > database >  Excel VBA changing decimal from point to comma
Excel VBA changing decimal from point to comma

Time:11-17

When Im working with decimals in arrays, VBA is changing the decimal point into comma:

enter image description here

And, since the comma is already the separator, VBA is separating the decimals into two integer numbers(e.g. 0,01 into 0 and 01, and 0.21 into 0 and 21

Im using the split/join technique since I need to merge several arrays depending on an index.

Is there any way to stop VBA converting decimals from point to comma?

Thanks

CodePudding user response:

Use Str and text values, as Join always returns text:

Join(Array(Str(Val / 100), "0.021", "2")

CodePudding user response:

Is it causing an error when you run the procedure?

  • Related