Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I wrote a VBA program for an Excel workbook. This program works just fine on my PC (US English setup), but my japanese collegues have problems. We observed that the VBA program changes on a japanese PC to the extent that syntax errors occur. This is how it happens: My code looks like this: ------------------------------------ Function ReplIllegal(ByVal txt As String) As String Dim ill As String ill = "´`@‚¬Â²Â³Â°^<\*./[]:;|=?,""" ' list of illegal characters ReplIllegal = "" txt = Replace(txt, "ä", "ae") txt = Replace(txt, "ö", "oe") txt = Replace(txt, "ü", "ue") txt = Replace(txt, "Ä", "Ae") <snip ------------------------------------- If the workbook is opened on a japanese computer, the code looks like this ('$' stands for various japanese characters): ------------------------------------ Function ReplIllegal(ByVal txt As String) As String Dim ill As String ill = "$`@$$$$^<$*./[]:;|=?,""" ' Japanese characters! ReplIllegal = "" txt = Replace(txt, ". , "ae") ' Syntax Error txt = Replace(txt, ". , "oe") ' Syntax Error txt = Replace(txt, ". , "ue") ' Syntax Error txt = Replace(txt, "$", "Ae") <snip ------------------------------------- Very bad is the replacement of "ä" by ". where the closing quotation mark gets lost. That leads to a syntax error. Is there any chance to avoid this problem? The solution must be applied to the workbook. A client side solution (e.g. installation of an add-on) is not acceptable. TIA, Christian |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help please - I want to program an interface to Excel 2003 | Excel Discussion (Misc queries) | |||
SP3 for Excel kills Add-ins | Excel Discussion (Misc queries) | |||
Japan characters in Excel 2007 | Excel Discussion (Misc queries) | |||
Excel-2003 Plug-In Program | Excel Programming | |||
automation error kills excel | Excel Programming |