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
- Sep 10 Mon 2007 20:39
run time error
close
全站熱搜
留言列表
發表留言