WebGuy
05-28-2007, 05:30 AM
Hi !
I have been trying to replace "." with ",". The replacefunction which works fine when i use it manually does not work at all when i try it in script form.
This is what i have so far :
While ActiveCell.Value <> ""
ActiveCell.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
' Selection.FindNext(After:=ActiveCell).Activate
ActiveCell.Offset(1, 0).Select
Wend
I want the script to change 401.345 into 401,345. I have a column full of batchweights which all have to be changed. My script only changes a handfull of them, in the rest of the weights i am left with 401345 instead of 401,345 which i want.
It is as if the script forgets to add the comma.
Help !
I have been trying to replace "." with ",". The replacefunction which works fine when i use it manually does not work at all when i try it in script form.
This is what i have so far :
While ActiveCell.Value <> ""
ActiveCell.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
' Selection.FindNext(After:=ActiveCell).Activate
ActiveCell.Offset(1, 0).Select
Wend
I want the script to change 401.345 into 401,345. I have a column full of batchweights which all have to be changed. My script only changes a handfull of them, in the rest of the weights i am left with 401345 instead of 401,345 which i want.
It is as if the script forgets to add the comma.
Help !