I am rolling out a simple VBA Macro to users which converts a .xlsx spreadsheet into a .csv file.
The macro works well for all users except those in China. When they run the macro they get a
1004: Application-defined or object-defined Error
on the line below:
Columns("A:Q").Select
Selection.Replace What:=ChrW(&H2C), Replacement:=ChrW(&H20), LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
This code replaces all commas with a period so the the csv formatting is correct.
Does anyone know why this error is only affecting users in China? Are there specific security setting I need to change? Or is there an alternative way in VBA to remove all commas (deleting them would be fine too)?
Any suggestions would be gratefully received. I cannot travel to China due to Covid, and remote assist to a Chinese Language laptop is basically unworkable.