- ©«¤l
- 75
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 109
- ÂI¦W
- 0
- §@·~¨t²Î
- windows XP
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- °ª¶¯
- µù¥U®É¶¡
- 2015-4-19
- ³Ì«áµn¿ý
- 2025-5-7
|
½Ð°ÝVBA¯«¤H:
n¦p¦ó±±¨îIEªºÈ¦bVBAª½±µ¿é¤J´N¦n?
¥H¤U¬O§Ú¼Ò¥éªºµ{¦¡¡A¦a°Ï¿é¤J: 104 ¡A
°õ¦æ¨ìSet what = .document.getElementByName("onchage")
´N¥X²{¿ù»~°T®§¡A¥i¬O¤£ª¾¹D«ç»ò§ï¡A½Ð°Ý¦³¤j¤j¥i¥H¨ó§U¶Ü??
Sub Ex_ºô¶¤¸¯À_3()
Dim E As Object, what As Object
Set objIE = CreateObject("InternetExplorer.application")
URL = "http://amis.afa.gov.tw/v-htm/v102.htm"
myjobtype = InputBox("¿é¤J¦a°Ï¥N¸¹:")
With objIE
.Visible = True
.Navigate URL
Do While .Busy Or .readyState <> 4: DoEvents: Loop
Set what = .document.getElementByName("onchage")
what.Item(0).Value = myjobtype
.document.getElementByName("B1").Click '·j´MÁä
With .document 'ºô¶ªº¤å¥ó
'*** ³o¬qµ{¦¡½X¥i¬d¬Ý³oºô¶ªº¤¸¯À¤º®e
On Error Resume Next
For Each E In .all
i = i + 1
Cells(i, "a") = E.tagname '±±¨î¶µ¼Ð°Oªº¦WºÙ
Cells(i, "b") = E.ID '±±¨î¶µ¼Ð°OªºID (±©¤@ªº)
Cells(i, "c") = E.Name '±±¨î¶µ¼Ð°Oªº©R¦W
Cells(i, "d") = E.Value '±±¨î¶µ¼Ð°OªºÈ
Cells(i, "e") = E.innertext '±±¨î¶µ¼Ð°Oªº¤å¦r
Cells(i, "f") = E.Type '±±¨î¶µ¼Ð°OªºÃþ«¬
Cells(i, "g") = E.href '±±¨î¶µ¼Ð°Oªººô§}
Next
'****************************************
End With
'.QUIT
End With
End Sub |
|