View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Office 2000 vs 2003

Columns("A:F").Select
Selection.Replace What:=" ", Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False

Should be sufficient. The ability to replace formats was addin in xl2003 as
I recall, so it isn't understood by xl2000 (the replace function didn't
have those arguments). Not using those arguments in xl2003 will not cause a
problem since you are not replacing by format.

--
Regards,
Tom Ogilvy

"hshayh0rn" wrote in message
...
I have some code that I created using Excel 2003 but when user's who have
2000 try to run it they get some errors. Here is a sample of the code

they's
choking:

Columns("A:F").Select
Selection.Replace What:=" ", Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

I was thinking it had something to do with the x1 part of the code but I'm
not sure. I'm not a programmer I just wrote this by recoding my tasks in a
macro and tying eveyrthing together. If there is an issue with code

between
office versions is there a more standard format for me to use?