String manipulation in macro runs slower each time ran.
I'm new to this. Here is the code I'm having problems with. Task manager
reports no memory problems.
Do Until Left$(ActiveCell.Value, 1) = Chr$(12)
lins = lins + 1
If lins 10000 Then
Exit Do
End If
If Len(ActiveCell) 255 Then
Fcel = ActiveCell
ActiveCell.Offset(1, 0).Activate
Selection.Insert Shift:=xlDown
ActiveCell = Right(Fcel, Len(Fcel) - 255)
ActiveCell.Offset(-1, 0).Activate
ActiveCell = Left(Fcel, 255)
'ActiveCell.Offset(1, 0).Activate
Else
Fcel = ""
End If
ActiveCell.Offset(1, 0).Select
Loop
"Lamination Technology" wrote:
The string manipulation is taking a long string and pasting segments of 255
characters into a cell until all the characters are in cells. After running
this about 3 times Excel slows to a halt. How do I fix this?
|