+ Reply to Thread
Results 1 to 3 of 3

Stop dialog box appearing as it stops macro

  1. #1
    Registered User
    Join Date
    06-28-2012
    Location
    skegness
    MS-Off Ver
    Excel 2003 & Excel 2010
    Posts
    2

    Stop dialog box appearing as it stops macro

    Hi all,

    Am sure this is easy one for someone... hopefully.

    I have a macro which runs to import info from an external file into Excel (I'm using Excel 2003 as it is easiest for my purposes). If the source file isn't running, my Excel macro errors and shows an 'End'.. 'Debug' dialog box. This then stops the macro from running once the source file is running again.

    Is there any way I can tell the macro to not show dialog and thus carry on or, just keep checking for file and import as normal when it's available?

    TIA

    Jack

  2. #2
    Forum Contributor wallyeye's Avatar
    Join Date
    05-06-2011
    Location
    Arizona
    MS-Off Ver
    Office 2010, 2007
    Posts
    308

    Re: Stop dialog box appearing as it stops macro

    You can wrap the section of code:

    Please Login or Register  to view this content.
    If the file could be tied up for a period of time, you might want to consider using application.ontime to retry every few seconds/minutes. The version above will get pretty cpu intensive quickly. A sample timer:

    Please Login or Register  to view this content.
    Understand I've not tested this, it will probably need debugging.

  3. #3
    Registered User
    Join Date
    06-28-2012
    Location
    skegness
    MS-Off Ver
    Excel 2003 & Excel 2010
    Posts
    2

    Re: Stop dialog box appearing as it stops macro

    Thanks for the reply, I'll look at that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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