|
楼主 |
发表于 2011-1-10 21:13
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
做好了,代码如下:- Sub dgfpchaxun()
- 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
- intnum = Application.WorksheetFunction.CountA([A:A])
- For i = 1 To intnum - 1
- With CreateObject("InternetExplorer.Application")
- .Visible = True
- .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
- End With
- Next i
- End Sub
复制代码 EXCEL的表格如附件 |
|