使用VBA excelsearch网站上的名字列表

我有一个Excel表格包含我想要在特定网页上search的名称列表,并将其结果导入到单元格中。 我用下面的代码来打开网页,但我不能找出正确的代码来点击loginbutton“我写的loginbutton的源代码”

我的代码打开网页并插入用户名和密码如下

Sub Button173_Click() ' open IE, navigate to the desired page and loop until fully loaded Set ie = CreateObject("InternetExplorer.Application") my_url = "https://www.checkname.com/frontend/login" With ie .Visible = True .Navigate my_url .Top = 50 .Left = 530 .Height = 400 .Width = 400 Do Until Not ie.Busy And ie.readyState = 4 DoEvents Loop End With 'Input the userid and password ie.Document.getElementById("signOnName").Value = "username" ie.Document.getElementById("password").Value = "password" 'Click the "Search" button ie.Document.getElementById("sign-in").Click Do Until Not ie.Busy And ie.readyState = 4 DoEvents Loop End Sub 

我的问题分为两部分:

  1. 如何点击网页上的button?

提交button的源代码是<button class="button" type="submit"><span class="bg-left"><span class="bg-right">Login</span></span></button>login

  <span class="bg-right">Login</span> 
  1. 如何将单元格A2中的一个名字例如放入打开的网页的文本框中,然后按search,然后获取search结果的链接并将其放到单元格B2中?

感谢您的支持和感谢,并提供示例代码将是伟大的。