Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trim Special Characters (Japanese Environment)
Hi,
I am using a procedure in my Macro that trims all the spaces(special characters like chr 160).The procedure is as shown below. The problem here is one of the users of this function uses Japanese operating system(She can view all the properties in the toolbar of Excel in Japanese). When she runs this procedure on her system, the trim function doesn't remove these special characters. What do i do to solve this problem?? Sub TrimRows() Workbooks(Macrotemp).Activate Dim ptotsht, shtn, name_S ptotsht = Sheets.Count shtn = 1 Do While shtn <= ptotsht name_S = Sheets(shtn).Name Workbooks(Macrotemp).Worksheets(name_S).Activate Dim l_r Application.Calculation = xlCalculationManual l_r = LastCell(Sheets(name_S)).Row Range("A2:F" & l_r).Select Dim cell As Range Selection.Replace What:=Chr(160), Replacement:=Chr (32), _ LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False On Error Resume Next For Each cell In Intersect(Selection, _ Selection.SpecialCells(xlConstants, xlTextValues)) cell.Value = Application.Trim(cell.Value) Next cell On Error GoTo 0 Application.Calculation = xlCalculationAutomatic Range("A1").Select shtn = shtn + 1 Loop End Sub Could someone please help!! I Appreciate any help in Advance. Thanks, Neeru. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a way to identify japanese characters? | Excel Discussion (Misc queries) | |||
chart size changes in Japanese environment | Excel Discussion (Misc queries) | |||
Help - Can't directly input Japanese characters into cell | Excel Discussion (Misc queries) | |||
How to save Japanese characters in CSV format of Excel ? | Excel Discussion (Misc queries) | |||
excel could not print japanese characters | Excel Discussion (Misc queries) |