Ask Your Question
0

click "Next" link in libreCalc macro

asked 2017-08-10 08:43:19 +0200

Muthulakshmi gravatar image

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
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-08-10 10:51:15 +0200

Muthulakshmi gravatar image

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

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-08-10 08:43:19 +0200

Seen: 80 times

Last updated: Aug 10 '17