I want to pass arguments in to my .vbs file and use them. So I did some research I tried to use WshSheel.Auguments
statement. But while executing through command prompt it is giving me an error message
object does not support this property/method:'WScript.Auguments'
Dim objExcel, strExcelPath, objSheet
'strValue=WScript.Auguments(0)
'arrValue=Split(strValue,"|")
Set WshSheel = CreateObject("WScript.Shell")
strExcelPath ="C:\Users\Z997710\Desktop\pension1.xlsx"
' Open specified spreadsheet and select the first worksheet.
Set objExcel = CreateObject("Excel.Application")
objExcel.WorkBooks.Open strExcelPath
Set objSheet = objExcel.ActiveWorkbook.Worksheets(3)
' Modify a cell.
'objSheet.Cells(2, 1).Value =20
objSheet.Cells(2, 1).Value =WScript.Auguments(0)
objSheet.Cells(2, 2).Value ="09/02/2015"
objSheet.Cells(2, 3).Value ="09/02/2020"
'objSheet.Cells(2, 1).Value =Trim(arrValue(0))
'objSheet.Cells(2, 2).Value =Trim(arrValue(0))
strValue=objSheet.Cells(12, 4).Value
objSheet.Cells(12, 5).Value = strValue
msgbox strValue
' Save and quit.`enter code here`
objExcel.ActiveWorkbook.Save
objExcel.ActiveWorkbook.Close
objExcel.Application.Quit
'WScript.Quit