Click "Next" link in libreCalc macro

When I click “Next” link in libre-macro coding, it will return an error as "BASIC runtime error.‘1’

Type: com.sun.star.lang.IllegalArgumentException
Message: [automation bridge] The object does not have a functionor readable property “Click”"

Option VBASupport 1

Sub nextlink()
URL = "http://keystonemanagement.com/apartments/me"

Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate URL

Do While ie.ReadyState <> 4
    DoEvents
Loop

oSheet = ThisComponent.getSheets().getByIndex(0)

doc = ie.document.body
Dim nextlink As Object
Set nextlink=doc.getElementsByClassName("pagenav")
For Each nlink In nextlink
 if(nlink.innerText="Next") Then
   nlink.Click
 End If
 Next nlink
       
ie.Quit
Set ie = Nothing
End Sub

The coding is working as instead of using “nlink.Click”, I have to use as “ie.Navigate nlink”
So the coding will be executed successfully