VBA for click on BUTTON Internet DOCUMENT

lulupatel

New Member
Joined
Apr 17, 2014
Messages
8
Dear Sir


I am Trying to click on button by VBA on internet document. but did not get successes. getting some error.


here bellow is my URL


https://www.justdial.com/Ahmedabad/...odakdev/079PXX79-XX79-160917190026-I9L7_BZDET


here bellow is my Code


Code:
Public Sub JDLOGIN()


'On Error Resume Next
    Dim Sn As Integer
    Dim ie As Object
    Dim url As String
    Dim Doc As HTMLDocument
    
   url = "https://www.justdial.com/Ahmedabad/Simran-Skin-Hair-Beauty-Clinic-Near-Judges-Banglows-Bodakdev/079PXX79-XX79-160917190026-I9L7_BZDET"
    Set ie = CreateObject("InternetExplorer.Application")


    With ie
      .Visible = 0
      .navigate url
       While .Busy Or .readyState <> 4
         DoEvents
       Wend
    End With


     Call ie.document.parentWindow.execScript("javascript:submt_os('2','whatsapptriggeer','whatsapptriggeer')")
   
    


End Sub




my be you will not get this ID "whatsaaptriggeer" in html in your PC/Laptop, because they need mobile number first to enter.


find my HTML


https://pastebin.com/1s8mkzij


you can that ID in this HTML in Row no. 25


please help me out how can I click this button by VBA
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
I also try following Code , that also not working.

Code:
Public Sub JDLOGIN()

'On Error Resume Next
    Dim Sn As Integer
    Dim ie As Object
    Dim url As String
    Dim Doc As HTMLDocument
    Dim btnGo As Object
    
   url = "https://www.justdial.com/Ahmedabad/Simran-Skin-Hair-Beauty-Clinic-Near-Judges-Banglows-Bodakdev/079PXX79-XX79-160917190026-I9L7_BZDET"
    Set ie = CreateObject("InternetExplorer.Application")


    With ie
      .Visible = 0
      .navigate url
       While .Busy Or .readyState <> 4
         DoEvents
       Wend
    End With
    
    Set btnGo = ie.document.forms(0).all("whatsapptriggeer") ' method:submit is the button's name


    btnGo.Click


End Sub
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,077
Members
449,094
Latest member
mystic19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top