zoukankan      html  css  js  c++  java
  • Excel宏打开URL 特殊字符#变了

    首先打开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 FilesInternet ExplorerIEXPLORE.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=")
    

      

  • 相关阅读:
    【Leetcode】113Path Sum II
    【leetcode】112. Path Sum
    virtualbox 中安装win7虚拟机
    制作一个vagrant的win7 box
    socket编程
    异常处理
    strip(),replace()和re.sub()用法
    面象对象 高阶篇
    面象对象 基础篇
    Subprocess模块介绍
  • 原文地址:https://www.cnblogs.com/allenfly/p/7426491.html
Copyright © 2011-2022 走看看