View Single Post
  #2   Report Post  
Ken
 
Posts: n/a
Default

Patti, I use:

Application.DisplayAlerts = False


"Patti" wrote:

Hi!

I have a simple Macro that runs all of the queries in my workbook. There's
a database error message that pops up for each of the queries -- it justs
requires the user to press OK to run the query. I want to turn off the
message so that all of the queries will run without any further actions by
the user. I've done something similar in Access, so I tried to use the same
code, but it's not working -- I'm getting an "Object required" run-time error.

Here's the code I'm using:

DoCmd.SetWarnings False
ActiveWorkbook.RefreshAll
DoCmd.SetWarnings True

What should I be using?

Thanks!