krishnak
04-21-2008, 04:39 PM
Hi All,
What is the basic difference between xlCalculationManual and xlCalculationAutomatic? For my PERSONAL.XLS workbook, the Calculation setting is Automatic. I am trying to understand a macro for a workbook with several worksheets. In this macro , while operating on the data of a particular worksheet, the setting is changed to xlCalculationManual and after the calculation is over the setting is changed to xlCalculationAutomatic.
I am looking at the following macro :
Sub Delete_Data()
StopCharacter = ""
ObjectColumn = "D"
DeleteCriteria = SelectedAccount
RowCounter = 2
Application.Calculation = xlManual
Do While Range(ObjectColumn & RowCounter).Value <> StopCharacter
If Range(ObjectColumn & RowCounter).Value = DeleteCriteria Then
Rows(RowCounter).Delete
Else
RowCounter = RowCounter + 1
End If
Loop
Application.Calculation = xlAutomatic
End Sub
Thanks in advance
- Krishna
What is the basic difference between xlCalculationManual and xlCalculationAutomatic? For my PERSONAL.XLS workbook, the Calculation setting is Automatic. I am trying to understand a macro for a workbook with several worksheets. In this macro , while operating on the data of a particular worksheet, the setting is changed to xlCalculationManual and after the calculation is over the setting is changed to xlCalculationAutomatic.
I am looking at the following macro :
Sub Delete_Data()
StopCharacter = ""
ObjectColumn = "D"
DeleteCriteria = SelectedAccount
RowCounter = 2
Application.Calculation = xlManual
Do While Range(ObjectColumn & RowCounter).Value <> StopCharacter
If Range(ObjectColumn & RowCounter).Value = DeleteCriteria Then
Rows(RowCounter).Delete
Else
RowCounter = RowCounter + 1
End If
Loop
Application.Calculation = xlAutomatic
End Sub
Thanks in advance
- Krishna