Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default DisplayAlerts and QueryTable issues

I think I found the answer....
When creating the query, at the point where you specify where to insert the
data; there is an advanced button, and inside is a setting that defaults to
"prompt for filename on Refresh" I unchecked this box and now the refresh
method called from auto_open uses the defaults.

I also that I could set the refresh to automatic on workbook open. but in
my case I did not want that to happen because the Auto_Open, prior to needing
a querytable.refresh has a choice to download via FTP from a mainframe that
is not yet allowing XML calls to get it's data. So If I dont FTP, then there
is no need to refresh the query table.


--
Regards,
John


"John Keith" wrote:


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

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
DisplayAlerts (Which Ones?) Klatuu Excel Programming 2 June 30th 05 02:09 PM
DisplayAlerts Howard Kaikow Excel Programming 12 April 29th 05 04:24 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 0 April 7th 04 06:11 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 1 April 6th 04 10:45 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 2 April 2nd 04 12:28 PM


All times are GMT +1. The time now is 10:16 PM.

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"