+ Reply to Thread
Results 1 to 3 of 3

File name without file path (data import) - Excel crash

  1. #1
    Registered User
    Join Date
    11-13-2012
    Location
    Poland
    MS-Off Ver
    Excel 2010
    Posts
    6

    File name without file path (data import) - Excel crash

    Hi, I've got the following Import macro, that imports data from another Excel file:

    Please Login or Register  to view this content.
    Everything works fine as long as the file name consists of 20 (or whatever number we will put there) signs (including .xls) due to this line Filename = Right(File, 20).

    Is there a way to change the code in a way that it will just get the file name without specifying its exact number of signs?

    Thanks in advance!
    Last edited by exinx; 11-19-2012 at 02:04 AM.

  2. #2
    Registered User
    Join Date
    11-13-2012
    Location
    Poland
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: File name without file path (data import)

    Ok found a solution. Simply modify the code with this line:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-13-2012
    Location
    Poland
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: File name without file path (data import) - Excel crash

    After finding solution to the file name problem, I'm now encountering a problem with crashes.. After using this macro for several times (5-6) Excel 2010 crashes.
    Do you have any idea what might be causing this or what to change in the code to prevent those crashes?

    The code:
    Please Login or Register  to view this content.
    Last edited by exinx; 11-19-2012 at 02:19 AM.

+ 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