Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Patti
 
Posts: n/a
Default Turn off warnings in Macro

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!
  #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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get simple macro to run Abi Excel Worksheet Functions 5 January 12th 05 07:37 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM
Removing Unnecessary Macro Security Warnings o0icebox0o Excel Discussion (Misc queries) 1 November 30th 04 12:09 AM
Macro for multiple charts JS Excel Worksheet Functions 1 November 19th 04 03:44 AM


All times are GMT +1. The time now is 09:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"