I know absolutely nothing about VB but I'm trying to compile a quick ping test macro within a word document to test some malware sandbox software. However, I keep getting the runtime 424 error.
I've done a bit of research but with 0 knowledge of VB, I've failed to identify a solution. The code is as follows.
Sub Ping()
' Ping Macro
If My.Computer.Network.Ping("192.168.1.10") Then
MsgBox ("Server pinged successfully.")
Else
MsgBox ("Ping request timed out.")
End If
End Sub
I'm clearly missing something here. I assumed the object would have been the message box but I was wrong. Anybody know what I'm missing here?
EDIT: Debug shows the first line being the issue.
If My.Computer.Network.Ping("192.168.1.10") Then
Thanks.