View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default Avoid prompts with QueryTables

Have you tried to set the DisplayAlerts property before and after the code
generating the prompt?
Application.DisplayAlerts = False
'... your code here
Application.DisplayAlerts = True

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"wolverine" wrote:

I am a VBA beginner and have managed to pull together an MS Access query
using the QueryTables feature. However, each time I run my code, I get a
dialog box asking me to select the database. I would like the code to
proceed without any user interaction once it's started. How do I prevent
this prompt from popping up?