+ Reply to Thread
Results 1 to 2 of 2

How not to open broken links

  1. #1
    Registered User
    Join Date
    05-09-2010
    Location
    Kirkenes, Norway
    MS-Off Ver
    Excel 2003
    Posts
    1

    How not to open broken links

    Hey, i've been working on a workbook which allows the user to import values from a large number of external workbooks. The workbooks are located in a filestructure separated by month. My workbook lets the user choose a prefix and month, which manipulates the filenames the macro gathers data from.

    The code is simply reapeating this line arround 60 times :

    Range("B" & iColum").value = sFilename

    However, sometimes the external workbook does not exist which causes excel to ask for "Update values: filename.xls" and allows the user to browse for the file.
    I do not want to user to have to be promted that, just simply ignore it and returne a empty cell.
    If my macro does not find the workbook, it is not there. So its just annoying and time consuming to have to click cancel every time a workbook can't be located.
    Is there a way to disable this promt, or to search the folder for files first so my macro does not try to open it?


    Thanks for any help.

    Joakim
    Last edited by Joakiml; 05-09-2010 at 02:31 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: How not to open broken links

    Joakiml
    Something like
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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