Hi
I am a VBA novice, and would appreciate your help trying to get a solution to my problem. I would like to remove all double spaces, and replace them with a single space within a worksheet (or just column B). The code needs to repeat until there are no more double spaces left.
What I have so far is this:
Sub remove_double_spaces()
Dim lLoop As Long
Dim strValFound As String
Do While ActiveCell <> ""
strValFound = Choose(lLoop, " ")
Columns(2).Replace What:=strValFound, _
Replacement:=" ", _
Lookat:=xlPart, MatchCase:=False
Loop
End Sub
The problem is I get a run-time error '94', and I really don't know how to fix it. Can anyone help?
Thanks in advance.
Bookmarks