+ Reply to Thread
Results 1 to 2 of 2

Prevent recalculation when opening .csv file

Hybrid View

duffry Prevent recalculation when... 06-05-2014, 09:03 AM
ranman256 Re: Prevent recalculation... 06-05-2014, 09:20 AM
  1. #1
    Registered User
    Join Date
    05-21-2013
    Location
    UK
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    86

    Prevent recalculation when opening .csv file

    Hi

    I have a sheet that holds a fair bit of data so I have calculation set to manual when using it, 'manual' full recalculations take about 30 seconds or so.

    I'm writing some VBA to import some data from a set of 30 .csv files. It requires each one be opened and the data moved as required. When I run it it seems that the main sheet performs a full recalc before the file opens.

    I have checked the options and it's set to manual.
    I have added the following just before the file opens to check with no change.
    Application.Calculation = xlCalculateManual
    Here's the line I'm using to open the file.
    Workbooks.OpenText _
                fileName:=pathWFMFiles & sheetsToLoad, local:=True, DataType:=xlDelimited, comma:=True
    Is there any way I can stop this recalculation?

    TIA
    If I've helped or inspired, please click the star.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,189

    Re: Prevent recalculation when opening .csv file

    I would have suggested that very way...so try an alternative
    keep the app.calc manual
    instead of .opentext ,... try "ActiveSheet.QueryTables.Add(Connection:= "TEXT;" & vCsvFile, _"

    (Data, import Text)

+ 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. Opening file with application+prevent dos window.
    By therock003 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2007, 07:53 AM
  2. Prevent UDF from calculating when opening file
    By Arie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-06-2006, 04:45 PM
  3. Prevent recalculation when opening earlier versions
    By rjamison in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2005, 08:05 PM
  4. [SOLVED] Re: Prevent recalculation when opening earlier versions
    By rjamison in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2005, 08:05 PM
  5. [SOLVED] Prevent recalculation when opening earlier versions
    By Mats Nilsson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2005, 12:06 PM

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