run time error

N

nuti

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 "Run" od object 'Iwshshell3' failed.


snippet of the code...
-------------------------------------------------------
----------------------------------------------------
Set objWSH = CreateObject("WScript.Shell")
--------------------------------------------------------
sCmd = "DNSCMD " & strDNSServer & " /recordadd " & strDNSZone & " " &
strAlias & " " & strtype & " " & strIPAddr
LogToLog "running:" & sCmd
lRet = objWSH.Run(sCmd, 0, True)


If lRet = 0 Then
LogToLog "successfully created DNSAlias " & strAlias & " for
IP-address " & strIPAddr & " on " & strDNSServer & "." & strDNSZone &
"."
Else
LogToLog "*** !!! Error by DNSAlias creation " & strAlias & "
for IP-address " & strIPAddr & " on " & strDNSServer & "." & strDNSZone

& "."
lCountErrors = lCountErrors + 1
End If


cheers,
Nuti
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top