0

我目前在 VBA 中使用下面的公式使用 excel 表中的条件搜索网络。我的问题是如何将链接粘贴到工作表中。我不想去网站,我想要一个超链接。我需要在工作表中添加搜索链接的代码是什么?

Sub GoogleSearch()

Dim objIEBrowser

Set objIEBrowser = CreateObject("InternetExplorer.Application")

objIEBrowser.Visible = True

Dim SearchTerm As String

For Each cell In Range("f:f")

    SearchTerm = cell
    SearchTerm = Replace(SearchTerm, " ", "+")

    objIEBrowser.navigate "https://www.google.com/?gws_rd=ssl#q=" & SearchTerm

Next

End
4

0 回答 0