#1   Report Post  
Posted to microsoft.public.excel.misc
nuti
 
Posts: n/a
Default run time error

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Time Manipulation BFiedler Excel Discussion (Misc queries) 0 September 15th 05 01:15 AM
conditional formatting with time values Access Idiot Excel Discussion (Misc queries) 2 September 13th 05 03:29 PM
Help needed with Run Time Error 1004 Manesh Excel Discussion (Misc queries) 0 April 4th 05 05:07 AM
How do you sum a range of more than 30 cells. I get error each time I try. Joseph Conaghan via OfficeKB.com Excel Worksheet Functions 5 March 21st 05 10:15 PM
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 7 March 7th 05 06:29 PM


All times are GMT +1. The time now is 01:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"