ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SearchFormat and ReplaceFormat (https://www.excelbanter.com/excel-programming/343655-searchformat-replaceformat.html)

Mike

SearchFormat and ReplaceFormat
 
I am having some issues going between versions. My box has Excel 2002 and I
am writing a macro for people using Excel 2000.

My find looks like this --- "Cells.Find(What:="Sample Type",
After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate" -- it works fine
in 2002

but on Excel 2000 the "SearchFormat:=False" gives an error.

If I change the find to -- " Cells.Find(What:="Sample Type",
After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False).Activate" -- it works in 2000 but not in 2002

Any help on a find and or find replace that will work in Excel 2000+???

Thanks
Mike

Don Guillett[_4_]

SearchFormat and ReplaceFormat
 
I just tested the last in xl2002 and it worked fine. I don't have 2000 but
also tested in xl97sr2 and it worked fine.

--
Don Guillett
SalesAid Software

"Mike" wrote in message
...
I am having some issues going between versions. My box has Excel 2002 and

I
am writing a macro for people using Excel 2000.

My find looks like this --- "Cells.Find(What:="Sample Type",
After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext,

_
MatchCase:=False, SearchFormat:=False).Activate" -- it works fine
in 2002

but on Excel 2000 the "SearchFormat:=False" gives an error.

If I change the find to -- " Cells.Find(What:="Sample Type",
After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext,

_
MatchCase:=False).Activate" -- it works in 2000 but not in 2002

Any help on a find and or find replace that will work in Excel 2000+???

Thanks
Mike





All times are GMT +1. The time now is 07:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com