💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
``` Private Declare 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 Sub Command1_Click() ' Shell "rundll32.exe url.dll,FileProtocolHandler http://www.baidu.com" '方法1 ' Shell "cmd.exe /c start http://www.baidu.com", 0 '方法2 ' Shell "explorer.exe http://www.baidu.com", 1 '方法3 ShellExecute hwnd, "open", "http://www.baidu.com", "", "", 1 '方法4 ShellExecute 0, "open", "IEXPLORE.EXE", "http://www.baidu.com", "", 1 '方法5 ShellExecute 0, "open", "IEXPLORE.EXE", "http://www.symental.com", "C:\Program Files\Internet Explorer\", 1 End Sub '备注:上面几种基本都一样,但是调用explorer.exe打开有点区别,它是在新窗口打开的 使用ie打开的两种方法: 1.Shell调用ie所在的全路径,然后后面加上要打开的网址,注意直接要用空格隔开。 2.通过创建ie对象然后调用,方法如下: Dim ie As Object Set ie = CreateObject("internetexplorer.application") ie.Visible = True ie.navigate "http://www.baidu.com" 3.可以直接调用ie打开,这样在新窗口的,比较好 ```