Find/Replace Macro

  • Thread starter Thread starter Shirley
  • Start date Start date
S

Shirley

I am building a macro to find and replace zeros (0) that are imported from
Excel (blank cells). I have used a combination of Select Object, RunCommands
and SendKeys to accomplish this action. It seems to work up to the point of
"REPLACE ALL" I can't find an action that would force "ENTER" to complete
the action. Any thoughts would be appreciated!
 
Don't use Find/Replace. Instead create an update query that will fix it.

Or just leave the table as is and deal with the null values as needed.
Something like the NZ function can convert the nulls to 0 easily in a query.
 
I am building a macro to find and replace zeros (0) that are imported from
Excel (blank cells). I have used a combination of Select Object, RunCommands
and SendKeys to accomplish this action. It seems to work up to the point of
"REPLACE ALL" I can't find an action that would force "ENTER" to complete
the action. Any thoughts would be appreciated!

WHOA!!!!

You're using the wrong tool for the job. A very simple Update query will do
the job. No macro and no code are needed.

What do you want updated, and what do you want it updated to? Did you import
blanks (Nulls) and need them set to zero or vice versa? A Query can do
either; a Macro can too, but it's much slower, much more complex, and not the
right way to go.
 
Back
Top