selection.replace is doing weird things
Posted by Pasi Vartiainen on June 09, 2000 4:26 AM
I have part of macrocode, which is doing something really stupid. I have workbook, which have rabdom number of sheet, macro goes trough all sheets, and replaces certain things. There is typecode, which is in format "3AFE********", so I have 8 digits after that 3AFE. When I replace 3AFE with empty, I keep running on problems. All cells in sheets are formated to be in TEXT format, but despite that, every time wwhen I run my macro which delete's that 3AFE, same problem occures: If typecode is 3AFE0*******, then first zero is drop out. After that, typecode is ruined, becourse it must have 8 chars.
Is this excel's bug, or am I doing something wrong? Actual replacement code is:
Selection.Replace What:="3AFE", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
If it is excel's bug, I must find different solution.
Thank's for your answers
Pasi Vartiainen