Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to identify japanese characters? K8_Dog[_2_] Excel Discussion (Misc queries) 0 August 5th 08 01:04 AM
chart size changes in Japanese environment Lydia Excel Discussion (Misc queries) 0 July 8th 08 08:36 PM
Help - Can't directly input Japanese characters into cell NKK Excel Discussion (Misc queries) 0 January 3rd 06 02:00 AM
How to save Japanese characters in CSV format of Excel ? Murali Ayyagari Excel Discussion (Misc queries) 0 September 30th 05 11:41 AM
excel could not print japanese characters inenewbl Excel Discussion (Misc queries) 0 April 14th 05 04:23 PM


All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"