|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
object variable or with block variable not set errorobject variable or with block variable not set I do not think its relatged to to the sping.dll I am using but how I am instantiating object but looking for help. Private Sub SwitchStatus() Dim ping As SPing Dim txtRemoteHost As String txtRemoteHost = "10.128.189.156" ping.RemoteHost = "" <---------------------------------When I select debug it highlights line. MsgBox txtRemoteHost ping.RemoteHost = txtRemoteHost ping.DoPing If ping.RemoteHostIP = "" Then MsgBox "Could not resolve host " + ping.RemoteHost End If Select Case ping.ReplyCode Case 0 IsOnline = True Case Else IsOnline = False End Select End Sub "Michael C" <nospam@nospam.com> wrote in message or, in VB,news:umnoGCyQGHA.3972@TK2MSFTNGP10.phx.gbl > ping = new sping Set ping = new sping -- Reply to the group so all can participate VB.Net: "Fool me once..." "Bob Butler" <tiredofit@nospam.com> wrote in message I'm always forgetting the Set, another source of vb bugs.....news:O1HFQ1yQGHA.792@TK2MSFTNGP10.phx.gbl... > "Michael C" <nospam@nospam.com> wrote in message > news:umnoGCyQGHA.3972@TK2MSFTNGP10.phx.gbl >> ping = new sping > > or, in VB, > Set ping = new sping Michael |
|||||||||||||||||||||||