+ Reply to Thread
Results 1 to 2 of 2

Can't import txt file after macro deleted target sheet once

  1. #1
    Registered User
    Join Date
    09-12-2012
    Location
    NC, USA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Can't import txt file after macro deleted target sheet once

    Hey guys,

    I've got a weird (at least for me) problem.

    I wrote a macro which works fine and calculates everything it should, perfect so far. Its last row of code delets all the data I've imported into the sheet "RawData" because I want the user to import new data every time and not to use the old ones eventually.

    I used:
    Sheets("RawData").Cells.ClearContents

    Works fine so far, but when I go ahead and try to import a new txt file into that sheet afterwords I can't import any data anymore. The "Get external data" tab is grey then and won't let me import anything. It would work on the other sheets though and when I create a new sheet it works well. Something must be wrong with the sheet after I clear it using my macro and I have no idea what it migt be

    Can anybody help me out here?

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Can't import txt file after macro deleted target sheet once

    yes, but attach a sample file with the macro and textfile
    If solved remember to mark Thread as solved

+ 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