View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default Help with Selection.Replace

OK Ayo. Now I know what to look for I can see the problem. I was off on the
wrong track altogether. I thought that you meant the code was not running at
all instead of one line of code just not doing what it should.

You need some more double quotes around the double quotes that are part of
the string replacement. When the double quotes are part of the string,
enclose them in more double quotes and still finish with double quotes at the
end of the string. A bit hard to read in this post but if you copy the code
and paste it to your VBA editor you should be able to see it better.

..Replace What:="=$D$7", _
Replacement:="<""""", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False, _
SearchFormat:=False, _
ReplaceFormat:=False

I like to use a line break at the end of each argument like the above
because I find it easier to read in a tabular format.


--
Regards,

OssieMac