admin管理员组

文章数量:1580443

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/wea_history/60198.htm"
    myd("朝阳区") = "https://tianqi.2345/wea_history/71141.htm"
    myd("东城区") = "https://tianqi.2345/wea_history/71445.htm"
    myd("大兴区") = "https://tianqi.2345/wea_history/60205.htm"
    myd("丰台区") = "https://tianqi.2345/wea_history/71142.htm"
    myd("房山区") = "https://tianqi.2345/wea_history/60206.htm"
    myd("海淀区") = "https://tianqi.2345/wea_history/71144.htm"
    myd("怀柔区") = "https://tianqi.2345/wea_history/60207.htm"
    myd("门头沟区") = "https://tianqi.2345/wea_history/60246.htm"
    myd("密云区") = "https://tianqi.2345/wea_history/60247.htm"
    myd("平谷区") = "https://tianqi.2345/wea_history/60204.htm"
    myd("石景山区") = "https://tianqi.2345/wea_history/71143.htm"
    myd("顺义区") = "https://tianqi.2345/wea_history/60202.htm"
    myd("通州区") = "https://tianqi.2345/wea_history/71071.htm"
    myd("西城区") = "https://tianqi.2345/wea_history/71446.htm"
    myd("延庆区") = "https://tianqi.2345/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

本文标签: 北京天气历史VBAExcel