Dim row, col
row = Sheets(1).UsedRange.Rows.Count
col = Sheets(1).UsedRange.Columns.Count
For i = 1 To row
Dim sum As Integer
sum = 0
For j = 1 To col
Dim s As Integer
s = Sheets(1).Cells(i, j).Value
sum = sum + s
Next j
Sheets(1).Cells(i, col + 1).Value = sum
Next i
Dim macroFileName,excelFileName,macroName
excelFileName = "a.xlsm"
macroFileName = "macroFileName"
macroName="macroName"
Dim excelApp, objWbk, excelPath
Dim inputRight
inputRight=False
With WScript
' to get current cmd folder path
excelPath = Replace(.ScriptFullName, .ScriptName, "")
'args
If WScript.Arguments.count=3 Then
excelFileName=WScript.Arguments(0) '
macroFileName=WScript.Arguments(1)
macroName=WScript.Arguments(2)
inputRight=True
Else
WScript.Echo "Args count error! need count 3, excelFileName macroFileName macroName"
End If
End With