pjmsimmons
Board Regular
- Joined
- Dec 13, 2011
- Messages
- 80
Hi All,
I have a piece of code which is working fine on my PC in Ireland (which uses English as regional settings). The code was also working fine when I sent it to colleagues in Norway.
The code took the worksheet 'Sample Info & Results' and converted it to a CSV file using getsaveasfilename.
However, I have now added the following code to the worksheet to round the data within the given range to 3 decimal places prior to exporting to the CSV file. This has created a problem in Norway as each cell within the range gives a '#Value!' error instead of displaying the value for each cell when the code has run. The code works perfectly for me in Ireland but my colleagues in Norway get the error. Removing the code gets the macro working again in Norway but obviously without the required rounding. I think it must be a localisation problem but has anyone any experience with this?
Any help much appreciated. The code is:
Regards,
Paul
I have a piece of code which is working fine on my PC in Ireland (which uses English as regional settings). The code was also working fine when I sent it to colleagues in Norway.
The code took the worksheet 'Sample Info & Results' and converted it to a CSV file using getsaveasfilename.
However, I have now added the following code to the worksheet to round the data within the given range to 3 decimal places prior to exporting to the CSV file. This has created a problem in Norway as each cell within the range gives a '#Value!' error instead of displaying the value for each cell when the code has run. The code works perfectly for me in Ireland but my colleagues in Norway get the error. Removing the code gets the macro working again in Norway but obviously without the required rounding. I think it must be a localisation problem but has anyone any experience with this?
Any help much appreciated. The code is:
Code:
For Each Cell In [e10:f102]
Cell.Value = Evaluate("round(" & Cell & ",3)")
Next Cell
Paul