Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Annoying Dialog Box

In cell "A1" I've created a Query using the wizard that simply imports
the contents of a Text file.
I've now recorded a macro to update this query:

Range("A1").QueryTable.Refresh BackgroundQuery:=True

and I've also tried:

Application.DisplayAlerts = False
Range("A1").QueryTable.Refresh BackgroundQuery:=True
Application.DisplayAlerts = True

When I run either of these and annoying dialog box appears named
"Import Text File" and I have to press "Import" for the macro to
continue

Anyone any ideas how to get rid of this, or am I up againsta
brickwall?
(there is a workaround but I'd rather plow straight ahead)

Any help greatly appreciated
Jason
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Annoying Dialog Box

Before you refresh your data (or even when you originally create the
query) set the following Data Range Property (it's very long name
describes exactly what it is)

Range("A1").QueryTable.TextFilePromptOnRefresh = True

----
Sean
"Just press the off switch, and go to sleep!"

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Annoying Dialog Box

I cannot duplicate, but sounds like the macro security
level may be invoking the popup.

Try lowering the Macro Security Level
tools...macro..security.



-----Original Message-----
In cell "A1" I've created a Query using the wizard that

simply imports
the contents of a Text file.
I've now recorded a macro to update this query:

Range("A1").QueryTable.Refresh BackgroundQuery:=True

and I've also tried:

Application.DisplayAlerts = False
Range("A1").QueryTable.Refresh BackgroundQuery:=True
Application.DisplayAlerts = True

When I run either of these and annoying dialog box

appears named
"Import Text File" and I have to press "Import" for the

macro to
continue

Anyone any ideas how to get rid of this, or am I up

againsta
brickwall?
(there is a workaround but I'd rather plow straight ahead)

Any help greatly appreciated
Jason
.

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
Annoying Replace Dialog Box Niniel Excel Discussion (Misc queries) 2 August 17th 07 07:46 PM
allow user to disable annoying warning dialog on log charts Roger Charts and Charting in Excel 3 September 13th 05 01:26 PM
Annoying pop up Sam Excel Discussion (Misc queries) 2 July 15th 05 02:08 PM
Excel's annoying "Getting Started" dialog box. Geoff in Vancouver Excel Discussion (Misc queries) 2 January 23rd 05 04:59 AM
control of dialog macro dialog box. on open Gerry Abbott Excel Programming 0 July 22nd 04 05:41 PM


All times are GMT +1. The time now is 03:40 AM.

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

About Us

"It's about Microsoft Excel"