I'm having issues with a simple VBScript that grabs both the Excel Application.CalculationSta
te Property value and the Excel Application.Calculation Property value and then displays both values to the screen.
The screen displays the proper value from the Application.CalculationSta
te Property of 0 to the screen. However, when trying to display the proper value from the Application.Calculation Property, the script errors on line 5 with the following message:
Error: Type mismatch: 'Calculation'
Source: Microsoft VBScript runtime error
System: The data is invalid.
I can't seem to figure out what I did wrong. Much help would be appreciated.
Set objExcel = CreateObject("Excel.Application")
Wscript.Echo "Calculation State: " & objExcel.CalculationState
Wscript.Echo "Calculation: " & objExcel.Calculation