Login into webpage through excel VBA

motherindia

Board Regular
Joined
Oct 15, 2015
Messages
218
Hello Sir,

I need to know how can I login into the following website using vba.

following is the website;

firstly I have to open/navigate the following web. Once it is opened I need to click

login page .

https://www.tdscpc.gov.in/



regards,
motherindia
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Code:
ActiveWorkbook.FollowHyperlink _
    Address:="https://nriservices.tdscpc.gov.in/nriapp/login.xhtml", _
    NewWindow:=True
 
Upvote 0
Hi footoo,

sorry I am getting error.
Even if I copy the link and try also not working.

Regards,
motherindia
 
Upvote 0
Hi footoo,

Thanks for sharing the link.
Since selenium wrapper driver or dll files needs to be installed , it is not possible to do so.

do we have option write in VBA only without help of selenium.

Regards,
motherindia
 
Upvote 0
Do you really need to do this with VBA?

What about using HYPERLINK in a worksheet cell? Does that work?
 
Upvote 0
Hi footoo,


is it possible to replace selenium with other alternative code in VBA for the following;


selenium.Start "IE", "https://www.tdscpc.gov.in/"
selenium.Open "/app/login.xhtml"
On Error GoTo r:

selenium.Type "id=userId", Worksheets("Login").Range("B3").Value
selenium.Type "id=psw", Worksheets("Login").Range("D3").Value
selenium.Type "id=tanpan", Worksheets("Login").Range("C3").Value
selenium.Wait 16000

On Error GoTo r:
selenium.Open "/app/ded/panverify.xhtml"

selenium.Type "id=pannumber", Cells(I, 2)
selenium.Select "id=frmType1", "label=24Q"
selenium.clickAndWait "id=clickGo1"

Regards,
motherindia
 
Upvote 0
I have no experience with this sort of code and difficult to comment since I cannot replicate your problem.

What about if you put the hyperlink address in A1 and run the following macro? Do you get the same error?
Code:
Sub OpenHyperlink()
[A1].Hyperlinks(1).Follow
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,486
Messages
6,113,932
Members
448,533
Latest member
thietbibeboiwasaco

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