【Excel VBA】edge打开北京 2345历史天气

Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
                          (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
                          ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOW = 5
Private Sub ss()
    Dim myd As Object
    Set myd = CreateObject("Scripting.Dictionary")
    myd("昌平区") = "https://tianqi.2345.com/wea_history/60198.htm"
    myd("朝阳区") = "https://tianqi.2345.com/wea_history/71141.htm"
    myd("东城区") = "https://tianqi.2345.com/wea_history/71445.htm"
    myd("大兴区") = "https://tianqi.2345.com/wea_history/60205.htm"
    myd("丰台区") = "https://tianqi.2345.com/wea_history/71142.htm"
    myd("房山区") = "https://tianqi.2345.com/wea_history/60206.htm"
    myd("海淀区") = "https://tianqi.2345.com/wea_history/71144.htm"
    myd("怀柔区") = "https://tianqi.2345.com/wea_history/60207.htm"
    myd("门头沟区") = "https://tianqi.2345.com/wea_history/60246.htm"
    myd("密云区") = "https://tianqi.2345.com/wea_history/60247.htm"
    myd("平谷区") = "https://tianqi.2345.com/wea_history/60204.htm"
    myd("石景山区") = "https://tianqi.2345.com/wea_history/71143.htm"
    myd("顺义区") = "https://tianqi.2345.com/wea_history/60202.htm"
    myd("通州区") = "https://tianqi.2345.com/wea_history/71071.htm"
    myd("西城区") = "https://tianqi.2345.com/wea_history/71446.htm"
    myd("延庆区") = "https://tianqi.2345.com/wea_history/60199.htm"
    With Range("A1")
        With .Validation
            .Delete
            .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
            xlBetween, Formula1:= _
            "东城区,西城区,通州区,大兴区,密云区, 怀柔区,丰台区,石景山区,门头沟区,昌平区,朝阳区,                        海淀区,顺义区,房山区,平谷区,延庆区"
            .IgnoreBlank = True
            .InCellDropdown = True
            .InputTitle = ""
            .ErrorTitle = ""
            .InputMessage = ""
            .ErrorMessage = ""
            .IMEMode = xlIMEModeNoControl
            .ShowInput = True
            .ShowError = True
        End With
        wz = .Value
    End With
    Call ShellExecute(0, "open", "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe", myd(wz), "", SW_SHOW)
End Sub

  • 8
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值