返回列表 上一主題 發帖

怎麼接收網頁資料

怎麼接收網頁資料

在網路上找到這個
紅色是錄製加入的,怎麼可以登入網頁,但怎麼無法使用新增web查詢
需要怎麼修改?謝謝~
Sub macro1()
With CreateObject("InternetExplorer.Application")
.Visible = True
.navigate "http://www.cnyes.com/_mem_bin/FormsLogin.asp?http://www.cnyes.com/global/gl_idx.asp"
Do Until .Readystate = 4
DoEvents
Loop
.Document.f1.cn.Value = "id"
.Document.f1.UserPASSWORD.Value = "password"
.Document.f1.submit
End With
  With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://www.cnyes.com/global/gl_idx.asp?type=1", Destination:=Range("A1") _
        )
        .Name = "gl_idx.asp?type=1"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlAllTables
        .WebFormatting = xlWebFormattingNone
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .Refresh BackgroundQuery:=False
    End With

End Sub
初學者color

??
怎麼都沒人
初學者color

TOP

        靜思自在 : 屋寬不如心寬。
返回列表 上一主題