无标题页面

Sub Main()
Static n As Long
Const username As String = "abcccc"
Const password As String = "abc11111"
    Cells.Delete
If n = 0 Then '首次运行需要登录
With ActiveSheet.QueryTables.Add("url;http://ac.ppdai.com/auth/Credentials", Range("a1"))
            .PostText = "UserName=" & username & "&Password=" & password
            .Refresh False
            .Delete
End With
End If
    n = n + 1
With ActiveSheet.QueryTables.Add("url;http://www.ppdai.com/list/584517", Range("a1"))
        .Name = "ppdai" & n
        .WebFormatting = xlWebFormattingNone
        .WebSelectionType = xlSpecifiedTables
        .WebTables = 2
        .Refresh False
End With
    Names("ppdai" & n).Delete
End Sub