首先打开EXCEL,点击左上角的"文件"按扭(07版的是的圆图标),打开选项,再点击自定义功能区(Customize Ribbon),在右边,把开发工具(Developer)前的打上勾,点确定打开开发工具。

在开发工具里选择insert一个按钮

https://jingyan.baidu.com/article/9113f81b0c19e22b3214c78e.html

按钮一的代码如下

ActiveWorkbook.FollowHyperlink Address:="http://www.baidu.com/production/#!finder_result?global=object-id&revs=latest&conf=no-configurations&text=", NewWindow:=True

而实际打开网页后发现     #!      变为%20_%20,导致网页打不开

 

修改代码为

Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.baidu.com/production/#!finder_result?global=object-id&revs=latest&conf=no-configurations&text=", vbNormalFocus

  或者

Dim web As Object
    Set web = CreateObject("InternetExplorer.Application")
    web.Visible = True
    web.Navigate ("http://www.baidu.com/prodution/#!test=")

  

posted on 2017-08-25 09:34  站在那看风景  阅读(467)  评论(0编辑  收藏  举报