Ping multiple ips and put the results to a cell near the ip in linux

Hi! I need to ping some ips like:
immagine
I have made a macro that need to be compatible for linux and windows, in windows is currently working but in linux i don’t know how to do it.
here is my code:

Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1


Function CheckOS()
    Dim CheckOSO As String
    CheckOS = Null
    CheckOSO = Application.OperatingSystem

    If InStr(1, LCase(CheckOSO), "windows") <> 0 Then
        CheckOS = True
    Else
        CheckOS = False
    End If

End Function

Function Ping(strip)



Dim objShell, boolcode
Ping = Null
boolcode = 3
If CheckOS = True Then
    Set objshell = CreateObject("Wscript.Shell")
    boolcode = objshell.Run("ping -n 1 -w 1000 " & strip, 0, 1)
Else
	
	'put here the linux instructions to ping
End If

If boolcode = 0 Then
    Ping = True
Else
    If boolcode = 1 Then
        Ping = False
    Else
        Ping = Null
    End If
End If
End Function

Sub PingSystem()
Dim strip As String

Do Until Worksheets("VMs").Range("D1").Value = "STOP"
Worksheets("VMs").Range("D1").Value = "TESTING"
For introw = 3 To Worksheets("VMs").Cells(Rows.Count, 16).End(xlUp).Row
    strip = Worksheets("VMs").Cells(introw, 16).Value
    If Ping(strip) = True Then
        Worksheets("VMs").Cells(introw, 4).Interior.Color = RGB(254, 254, 160)
        Worksheets("VMs").Cells(introw, 4).Font.Color = RGB(0, 0, 0)
        Worksheets("VMs").Cells(introw, 4).Value = "y"
        'Application.Wait (Now + TimeValue("0:00:01"))'
        Worksheets("VMs").Cells(introw, 4).Font.Color = RGB(0, 200, 0)
        Worksheets("VMs").Cells(introw, 4).Interior.Color = RGB(223, 236, 212)
    Else
        If Ping(strip) = False Then
            Worksheets("VMs").Cells(introw, 4).Interior.Color = RGB(254, 254, 160)
            Worksheets("VMs").Cells(introw, 4).Font.Color = RGB(0, 0, 0)
            Worksheets("VMs").Cells(introw, 4).Value = "n"
            'Application.Wait (Now + TimeValue("0:00:01"))'
            Worksheets("VMs").Cells(introw, 4).Font.Color = RGB(200, 0, 0)
            Worksheets("VMs").Cells(introw, 4).Interior.Color = RGB(252, 174, 148)
        Else
            Worksheets("VMs").Cells(introw, 4).Interior.Color = RGB(254, 254, 160)
            Worksheets("VMs").Cells(introw, 4).Font.Color = RGB(0, 0, 0)
            Worksheets("VMs").Cells(introw, 4).Value = "err"
            'Application.Wait (Now + TimeValue("0:00:01"))'
            Worksheets("VMs").Cells(introw, 4).Font.Color = RGB(200, 0, 0)
            Worksheets("VMs").Cells(introw, 4).Interior.Color = RGB(252, 174, 148)
        End If
    End If
    If Worksheets("VMs").Range("D1").Value = "STOP" Then
        Exit For
    End If
Next
Worksheets("VMs").Range("D1").Value = "STOP"
Loop
Worksheets("VMs").Range("D1").Value = "IDLE"
End Sub

Sub stop_ping()
    Worksheets("VMs").Range("D1").Value = "STOP"
End Sub

pls help me!

[erAck: edited to make that an actual code block (using ```text because otherwise Basic becomes ugly coloured)]

Except for a few special cases I would avoid this. If you are unsure how to write LibreOffice macros, start with Andrew Pitonyak’s macro document. For example oSheet = ThisComponent.Sheets.getByName("Sheet_Name_To_Activate").

This code is only for Windows, and even on Windows I would not recommend it. Instead, use a system call.

What I would do is write the code as a Python macro. Then do the system call and capture the output with the subprocess module. It looks like this can be done in Basic as well by copying the output to the clipboard, but to me that looks more difficult.