Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Howto prevent automatic calculation when open a CSV file

Even though the debug.print s shows the calculation to be xlManual, the
current sheet automatically calculates its cells when execute the following
code.

Is there anyway to prevent the auotmatic calculation when opening a CSV file?

Thanks!
Steve

==============================
Private Sub CommandButton1_Click()
Application.Calculation = xlCalculationManual

Debug.Print Application.Calculation
Dim wkb As Workbook
Set wkb = Application.Workbooks.Open("C:\test.csv", Format:=2,
delimiter:=",", ReadOnly:=True, UpdateLinks:=0, origin:=xlWindows)
'Set wkb = Application.Workbooks.Open("C:\test.xls")
Debug.Print Application.Calculation

wkb.Close
Set wkb = Nothing

Debug.Print Application.Calculation
End Sub
============================
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I prevent Excel trying to open a non-existing file at start Jesperfect Excel Discussion (Misc queries) 0 May 15th 09 01:11 PM
Prevent calculation on open littlefb Excel Discussion (Misc queries) 10 March 17th 09 04:00 PM
Prevent reviewing toolbar from coming up when I open a file? _justbob49 Excel Discussion (Misc queries) 1 December 21st 07 03:25 PM
Prevent Access To already open file ashtod1 New Users to Excel 0 January 5th 06 10:57 PM
prevent open invalid Excel file Sa Excel Programming 4 April 22nd 05 02:23 PM


All times are GMT +1. The time now is 08:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"