IE.Navigate语法,URL和端口作为变量

时间:2017-07-14 12:54:20

标签: excel-vba excel-formula vba excel

如果我想将url和port用作变量,IE.Navigate的正确语法是什么?

1 个答案:

答案 0 :(得分:0)

不知道你是否找到了答案,但看看这个是否有帮助

Set ie = New SHDocVw.InternetExplorer
myUrl = "http://www.something.com"
myPort = "8080"
    With ie
    .Visible = True
    .AddressBar = False
    .Toolbar = False
    .FullScreen = False
    .Navigate url:= myUrl & ":" & myPort

    While .ReadyState < 4 Or .Busy:  DoEvents:  Wend