wsh - windows Shell Script not working with VB editor -


can tell me why code:

set wshnetwork = wscript.createobject("wscript.network")  strcomputername = wshnetwork.computername  msgbox strcomputername  pcname = mywb.cells(4, 3).value  if strcomputername = pcname  msgbox "hi vivek!!"  end if 

works in vbs file when it's put in code in vb editor runtime time error 424 - object required? library need reference? using ms excel 2010. have tried adding below libraries in reference:

ms scripting runtime ms script control , windows script host object model none of these seem work me.

late binding excel 2010 using object variable

tools-->reference-->microsoft 14.0 object library

dim strcomputername string dim objws object  set objws = createobject("wscript.network") strcomputername = objws.computername msgbox strcomputername  set objws = nothing 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -