String manipulation in macro runs slower each time ran.
Mark,
Thanks for the response. I'll try to give you all the information without
going overboard. Also I think that I'm about to track down the problem. I am
taking a string of data withover 1200 characters. Take the string, copy and
paste it into the next cell, back up to the previous cell, & trim the excess
of 255 characters on the right. I wind up with the data string in a column of
cells with 255 characters per cell. The reason for this, just in case
someone else runs into this problem, I am copying each character into a cell
on the next spread sheet for analysis.( Max 256 cells in a row) This is
captured code from a PLC com port.
Back to my problem----I think the problem occurs when the paste is being
done and cells are shifted down. I'm running Excel 2003. If I shut down the
spreadsheet, the open it again the problem goes away. I can run the macros
about 3 times before excel crawls to a halt. Aggrivating! Would you like to
look at the spreadsheet?
"Mark Lincoln" wrote:
Without knowing the context in which you're running this, I have to
guess that you may be moving growing amounts of text each time you run
this code. Do you run it from the top of a column every time, thereby
moving all your previous text down with each pass through the loop?
BTW, in testing this in Excel 97 I had to change the first line to get
the loop to end properly:
Do Until (ActiveCell.Value) = Empty
|