|
楼主 |
发表于 2011-1-11 13:24
|
显示全部楼层
勉强搞定了,麻烦高手修改下,谢谢
勉强搞定了,麻烦高手修改下,谢谢- Sub Test()
- Dim intnum As Integer
- Dim i As Integer
- Dim strfpdm As String
- Dim strfphm As String
- Dim strxhfswdjh As String
- Dim strxhfmc As String
- Dim sglkpje As Single
- Dim strkprq As String
- Dim Strtext1 As String
- Dim objie1 As Object
- Dim stronm As String
- Dim objdoc As Object
- intnum = Application.WorksheetFunction.CountA([A:A])
- For i = 1 To intnum - 1
- Set objie1 = CreateObject("InternetExplorer.Application")
- With objie1
- .Visible = False
- .navigate "http://app.gd-n-tax.gov.cn/wssw/jsp/common/query/invoice_checking/invoice_checking_input.jsp"
- Do Until .Readystate = 4
- DoEvents
- Loop
- strfpdm = Cells(i + 1, 1).Value
- strfphm = Cells(i + 1, 2).Value
- strxhfswdjh = Cells(i + 1, 3).Value
- strxhfmc = Cells(i + 1, 4).Value
- strkpje = Format(Cells(i + 1, 5).Value, "0.00")
- strkprq = Cells(i + 1, 6).Value
- .document.All("fpdm").Value = strfpdm
- .document.All("fphm").Value = strfphm
- .document.All("xhfswdjh").Value = strxhfswdjh
- .document.All("xhfmc").Value = strxhfmc
- .document.All("kpje").Value = strkpje
- .document.All("kprq").Value = strkprq
- .document.All("check_code").Value = .document.All("INVOICE_CHECKING_CHECKCODE").Value
- .document.All.submit_btn.Click
- Do Until .locationname = "广东省国家税务局发票查验:结果"
- DoEvents
- Loop
- Do Until .Readystate = 4
- DoEvents
- Loop
- Application.Wait (Now + TimeValue("0:00:02"))
- Strtext1 = .document.body.innertext
- Sheets(1).Cells(i + 1, 8) = Strtext1
- End With
- Next i
- MsgBox "Ok"
- End Sub
复制代码 EXCEL见附件 |
|