View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Keith[_2_] John Keith[_2_] is offline
external usenet poster
 
Posts: 175
Default DisplayAlerts and QueryTable issues


Application.DisplayAlerts = False
Sheets("SiteData").Select
Selection.QueryTable.Refresh BackgroundQuery:=False

the Query was created manually by going through the menu drop downs and
selecting the file, then seperating the data into proper columns.

When executing this code from an Auto_Open the dialog boxes still popup.
The Default info is already properly set in the connection string. How do I
prevent these pesky dialog boxes from interrupting the flow?

From the "Refresh" method's help screens...
After Microsoft Excel makes a successful connection, it stores the completed
connection string so that prompts won't be displayed for subsequent calls to
the Refresh method during the same editing session. You can obtain the
completed connection string by examining the value of the Connection property.

It seems that since I am calling the .refresh upon initial loading of the
spreadsheet this qualifies as the first successful connection for this edit
session.

How do i force the refresh to use all the defaults?


--
Regards,
John