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 Cells.Replace in VBA

You don't. You can repeat the command on each sheet.

for each sh in Activeworkbook
sh.Activate
cells.Replace . . .
Next


--
Regards,
Tom Ogilvy

"Gary''s Student" wrote in message
...
How do I specify workbook rather than sheet in Cells.Replace in VBA:

Cells.Replace What:="x", Replacement:="y", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False,
ReplaceFormat:=False
--
Gary''s Student