VojtaR
Automotive
- Apr 2, 2020
- 20
Hello,
I am looking everywhere for a way how to write a formula into cell, but am keep getting this error:
---------------------------
CNEXT - CATScriptErrorMessages - ScriptingERR_1002
---------------------------
Execute the script "Excel formulas.CATScript".
The scripting engine for CATScript has reported the following error:
Source: Microsoft VBScript runtime error
Description: Unknown runtime error
Line: 13
Column: 0
Here is my code:
Can anyone help me with that?
Thanks
I am looking everywhere for a way how to write a formula into cell, but am keep getting this error:
---------------------------
CNEXT - CATScriptErrorMessages - ScriptingERR_1002
---------------------------
Execute the script "Excel formulas.CATScript".
The scripting engine for CATScript has reported the following error:
Source: Microsoft VBScript runtime error
Description: Unknown runtime error
Line: 13
Column: 0
Here is my code:
Code:
Sub CATMain()
Set Excel = CreateObject("Excel.Application")
Excel.visible = true
Set workbooks = Excel.Application.workbooks
Set myworkbook = Excel.workbooks.Add
Set objsheet1 = Excel.Sheets.Add
objsheet1.Cells(1, 1) = "Part Name"
objsheet1.Cells(1, 2) = "Localization"
objsheet1.Cells(2, 2) = "=LEFT($A2;2)"
End Sub
Can anyone help me with that?
Thanks