close

hi folks..
wheni m trying to run my vba im gettin this run time error at this
line..

lRet = objWSH.Run(sCmd, 0, True)runtime error : '2147024894(80070002)':
method quot;Runquot; od object 'Iwshshell3' failed.

snippet of the code...
-------------------------------------------------------
----------------------------------------------------
Set objWSH = CreateObject(quot;WScript.Shellquot;)
--------------------------------------------------------
sCmd = quot;DNSCMD quot; amp; strDNSServer amp; quot; /recordadd quot; amp; strDNSZone amp; quot; quot; amp;
strAlias amp; quot; quot; amp; strtype amp; quot; quot; amp; strIPAddr
LogToLog quot;running:quot; amp; sCmd
lRet = objWSH.Run(sCmd, 0, True)If lRet = 0 Then
LogToLog quot;successfully created DNSAlias quot; amp; strAlias amp; quot; for
IP-address quot; amp; strIPAddr amp; quot; on quot; amp; strDNSServer amp; quot;.quot; amp; strDNSZone amp;
quot;.quot;
Else
LogToLog quot;*** !!! Error by DNSAlias creation quot; amp; strAlias amp; quot;
for IP-address quot; amp; strIPAddr amp; quot; on quot; amp; strDNSServer amp; quot;.quot; amp; strDNSZone
amp; quot;.quot;
lCountErrors = lCountErrors 1
End If

cheers,
Nuti

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()