+ Reply to Thread
Results 1 to 2 of 2

Removing warning messages

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Removing warning messages

    I use the following code to download Text files containing data into my applications
    Sub QueryN(SheetName As String, N)
         Application.DisplayAlerts = False
        On Error Resume Next
       
        Range(SheetName & "_Clear" & N).Clear
        Sheets(SheetName).Select
            Range(SheetName & "_Table" & N).QueryTable.Refresh BackgroundQuery:=False
        
       Application.DisplayAlerts = True
    End Sub
    When this is run it works except that a window pops up asking which file to down load. This is not necessary as the Query already contains the identity of the file to be used.
    It is also a problem to the user who will not in general know the name of the file.
    Can this window be suppressed? Application.DisplayAlerts does not help.
    John

  2. #2
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Re: Removing warning messages

    As a follow up to my mornings post. As well as the text files called by the procedure above I connect to some data by an ODBC link set up in MSQuery.
    There is a small modification to the above code.
    Range(SheetName & "_Table" & N).ListTable.QueryTable.Refresh BackgroundQuery:=False
    This works without asking for the identity of the file to be downloaded.

    Has anyone some ideas?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to disable hyperlink warning messages?
    By rskfriends in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-10-2019, 04:01 AM
  2. How to use VBA to create two warning messages related to one cell
    By Ledmac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-05-2013, 05:37 PM
  3. Smileys in Warning Messages in Formulas
    By robertguy in forum Excel General
    Replies: 5
    Last Post: 02-14-2012, 06:21 PM
  4. Messages box as warning for changes withing a range
    By mikeyfear in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-23-2008, 03:00 AM
  5. [SOLVED] annoying sort warning messages
    By P D Sterling in forum Excel General
    Replies: 1
    Last Post: 07-22-2006, 08:05 AM
  6. Outlook Warning Messages
    By AD108 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2006, 01:10 PM
  7. supressing system warning messages
    By ppete83606 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-15-2005, 01:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1