run time error

N

nuti

hi all,

im running a macro which sets dns names for all the clients.
it takes the input from the excel sheet.

whil executing i got this run time error.

Got Run-Time error: -

2147024894(80070002) Method 'Run' of object 'IWshShell3' failed

how wshould i go about it?
 
N

nuti

ooopsss....im sorry folks....

here is the snippet....
-----------------------------------------------------------
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
LogToLog ""

----------------------------------------------------------------------------
 

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

Similar Threads


Top