ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   run time error (https://www.excelbanter.com/excel-programming/350629-run-time-error.html)

nuti

run time error
 
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?


[email protected]

run time error
 
Hi
No one will reply to this. What have they got to go on??

regards
Paul


nuti

run time error
 
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 ""

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



All times are GMT +1. The time now is 12:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com