Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I prevent Excel trying to open a non-existing file at start | Excel Discussion (Misc queries) | |||
Prevent calculation on open | Excel Discussion (Misc queries) | |||
Prevent reviewing toolbar from coming up when I open a file? | Excel Discussion (Misc queries) | |||
Prevent Access To already open file | New Users to Excel | |||
prevent open invalid Excel file | Excel Programming |