![]() |
|
#2
|
|||
|
|||
|
In my experience the line breaks and carriage returns take many names. I have found that if I try to replace just one type it dosnt get them all. The code below works very well to remove ALL line breaks or carriage returns.
Code:
Dim v as Variant, BadData as Variant
BadData = Array (vblf, vbcrlf, vbcr, Chr(10), Chr(13))
For Each v in BadData
MyRange = Replace(MyRange, v, ",")
Next v
Code:
Dim v as Integer, BadData as Variant
BadData = Array (vblf, vbcrlf, vbcr, Chr(10), Chr(13))
For v = 0 to ubound(BadData)
MyRange = Replace(MyRange, BadData(v), ",")
Next v
the 2nd one uses less memory. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
stop carriage return or enter key in a table
|
Alaska1 | Word | 1 | 01-14-2013 08:48 AM |
Coding into a macro a carriage return
|
sinbad | Word VBA | 6 | 02-27-2012 03:51 AM |
Paragraph (carriage) return font size
|
revrossreddick | Word | 2 | 12-28-2011 01:33 PM |
| Carriage Return Help | UCHelp | Word | 1 | 04-04-2010 10:11 PM |
Table of contents, remove spacing and put in 2 columns - need help urgently!
|
nam085 | Word | 1 | 03-04-2010 08:00 AM |