ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] WebBrowser1¦bExcel VBAµLªk¹B¦æ

[µo°Ý] WebBrowser1¦bExcel VBAµLªk¹B¦æ

¥»©«³Ì«á¥Ñ Amin ©ó 2014-7-26 12:15 ½s¿è

WebBrowser1¦b¦Û¤v¼gªºExcel VBAµLªk¹B¦æ
¨Ï¥Î§O¤H¼g¦nªºWebBrowser1«o¥i¥H¹B¦æ
¤Þ¥Î¶µ¥Ø¤]²K¥[¤F¡uMicrosoft HTML Object Libaray¡v
½Ð°Ý¦U¦ì­n¦p¦ó¯à±N¦Û¤v¼gªºExcelVBA¹B¦æWebBrowser1?
¦p¤Uµ{¦¡½X
  1. Sub test()
  2.    WebBrowser1.Navigate "http://www.google.com/"
  3.     Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
  4.         DoEvents
  5.     Loop
  6.     On Error Resume Next
  7.     WebBrowser1.Navigate "about:blank"
  8. End Sub
½Æ»s¥N½X

¸É¤W¤@±iµo¥Í¿ù»~ªº¹Ï

TOP

¦^´_ 2# Amin
  1. Sub test()
  2.     Dim WebBrowser1 As Object
  3.    
  4.     Set WebBrowser1 = CreateObject("InternetExplorer.Application")
  5.    
  6.     WebBrowser1.Navigate "http://www.google.com/"
  7.     ' Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
  8.     '     DoEvents
  9.     ' Loop
  10.     MsgBox WebBrowser1.ReadyState
  11.     On Error Resume Next
  12.     WebBrowser1.Navigate "about:blank"
  13. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ Amin ©ó 2014-7-26 22:05 ½s¿è

¦^´_ 3# c_c_lai

·PÁÂc_c_lai ¤j¤jªº¦^ÂÐ

¤£¹L§Ú­nªº¤£¬O³o¼Ëªº¤º®e¡A§Úª¾¹D¥i¥Hª½±µ¥ÎCreateObject("InternetExplorer.Application")³o­Ó
¦ý³o¼Ë´N¤£¬OWebBrowser1 ª«¥ó¤F¡A·|Åܦ¨InternetExplorerª«¥ó¾Þ§@¡A§Ú­nªº¬O¯ÂWebBrowser1 ª«¥ó¨Ó¶i¦æ¾Þ§@

§Úªþ¤W§Ú§ä¨ìªº½d¨Ò¡A¥Î¯ÂWebBrowser1 ª«¥ó¼gªº
¥i¥H°Ñ¦Ò¬Ý¬Ý¥L¨Ã¨S¦³¥ÎCreateObject("InternetExplorer.Application")¡A
¥L¥u¥u¦³¦b¡u¤Þ¥Î¶µ¥Ø¡v²K¥[¤F¡uMicrosoft HTML Object Libaray¡v
¦b¡uMicrosoft HTML Object Libaray¡v¸Ì­±¦³¥]§tInternetExplorer»PWebBrowser1 ³o¨â­Óª«¥ó
§Ú¯à°µªº³£¤w¸g¸ò¥L°µ¨ì¬Û¦Pªº³]©w¤F¡A¤£ª¾¹D¬O¤£¬OÁÙ¦³¤Ö
½Ðc_c_lai ¤j»P¦U¦ì¤j¤j°Ñ¦Òªþ¥ó
jKtC2df0.rar (24.63 KB)

TOP

¦^´_ 2# Amin


   
  1. Sub Ex()
  2.     Dim Rng As Range
  3.     With Sheet1
  4.         Set Rng = .[b2].Resize(30, 15)
  5.         With .OLEObjects.Add(ClassType:="Shell.Explorer.2", Left:=Rng.Left, Top:=Rng.Top, _
  6.                 Width:=Rng.Width, Height:=Rng.Height)
  7.                 .Object.Navigate "http://forum.twbts.com/thread-12287-1-1.html"
  8.         End With
  9.        .Select
  10.     End With
  11. End Sub
  12. '************************************
  13. Sub Ex1() '.OLEObjects.Add ¤§«á ¥i¦p¦¹
  14.     Sheet1.WebBrowser1.Navigate "http://bendi.koubei.com/search/searchstore.html?option.cityname=%CE%C2%D6%DD&option.category=4&option.distance=2000&pageNo=1"
  15. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 5# GBKEE

·PÁÂGBKEE¤j¦^À³¡A§A´£ªº¤è¦¡§Ú¤]¸Õ¹L¬O¥i¦æªº
¦ý§Ú¦b«e­±¦³¦^À³c_c_lai ¤j®É¦³ªþ¤W½d¨Ò
³o­Ó½d¨Ò¨Ã¥¼¨Ï¥ÎGBKEE¤jªº¤èªk¡A¤]¥i¥HÅýWebBrowser1°Ê§@
¦Ó¥B§Ú¤]¸Õ¹L±N¥H¤Uªºµ{¦¡¼g¦bªþ¥óªº½d¨Ò¸Ì­±¡A¤]¬O¥i¥Hwork
½Ð°ÝGBKEE¤j¦³¸Ñªk¶Ü?
  1. Sub test()
  2.    WebBrowser1.Navigate "http://www.google.com/"
  3.     Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
  4.         DoEvents
  5.     Loop
  6.     On Error Resume Next
  7.     WebBrowser1.Navigate "about:blank"
  8. End Sub
½Æ»s¥N½X

TOP

¦^´_ 6# Amin


   
WebBrowser1¦b¦Û¤v¼gªºExcel VBAµLªk¹B¦æ
¨Ï¥Î§O¤H¼g¦nªºWebBrowser1«o¥i¥H¹B¦æ
¥i¥H¬Ý¬Ý§AªºÀɮ׶Ü?
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 7# GBKEE


GBKEE¤j
§ÚªºÀÉ®×ùØ­±´N¥u¦³¥Î§Ú¶K¥X¨Óªºµ{¦¡½X¦Ó¤w
¦b¤Þ¥Î¶µ¥Ø¸Ì²K¥[¡uMicrosoft HTML Object Libaray¡v
¨ä¥Lªº³£¨S¦³°µ¥ô¦ó¨Æ

TOP

¦^´_ 8# Amin
1# ¿ù»~¹Ï¥Ü ¦¹³B»Ý­nª«¥ó
´N¬O§i¶D§A¨S¦³WebBrowser1³oª«¥ó
§A¤£ªþÀɤW¨Ó½Öª¾¹D§Aªº§Aªº¿ù»~¦b¨º¸Ì.
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 9# GBKEE


    Test.zip (11.67 KB)

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD