admin管理员组文章数量:1580204
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
版权声明:本文标题:【Excel VBA】edge打开北京 2345历史天气 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dianzi/1727866665a1134521.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论