Board logo

¼ÐÃD: [µo°Ý] WebBrowser1¦bExcel VBAµLªk¹B¦æ [¥´¦L¥»­¶]

§@ªÌ: Amin    ®É¶¡: 2014-7-26 12:14     ¼ÐÃD: 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

§@ªÌ: Amin    ®É¶¡: 2014-7-26 12:21

¸É¤W¤@±iµo¥Í¿ù»~ªº¹Ï
[attach]18762[/attach]
§@ªÌ: c_c_lai    ®É¶¡: 2014-7-26 19:34

¦^´_ 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

§@ªÌ: Amin    ®É¶¡: 2014-7-26 22:02

¥»©«³Ì«á¥Ñ 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°Ñ¦Òªþ¥ó
[attach]18764[/attach]
§@ªÌ: GBKEE    ®É¶¡: 2014-7-27 15:32

¦^´_ 2# Amin


    [attach]18766[/attach]
  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

§@ªÌ: Amin    ®É¶¡: 2014-7-27 19:36

¦^´_ 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

§@ªÌ: GBKEE    ®É¶¡: 2014-7-28 15:23

¦^´_ 6# Amin


   
WebBrowser1¦b¦Û¤v¼gªºExcel VBAµLªk¹B¦æ
¨Ï¥Î§O¤H¼g¦nªºWebBrowser1«o¥i¥H¹B¦æ
¥i¥H¬Ý¬Ý§AªºÀɮ׶Ü?
§@ªÌ: Amin    ®É¶¡: 2014-7-28 15:40

¦^´_ 7# GBKEE


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

¦^´_ 8# Amin
1# ¿ù»~¹Ï¥Ü ¦¹³B»Ý­nª«¥ó
´N¬O§i¶D§A¨S¦³WebBrowser1³oª«¥ó
§A¤£ªþÀɤW¨Ó½Öª¾¹D§Aªº§Aªº¿ù»~¦b¨º¸Ì.
§@ªÌ: Amin    ®É¶¡: 2014-7-28 16:02

¦^´_ 9# GBKEE


    [attach]18778[/attach]
§@ªÌ: Amin    ®É¶¡: 2014-7-28 16:07

¦^´_ 9# GBKEE


    §Úª¾¹D¿ù»~¦b­þ¡A¦p§Ú¤@¶}©l¸É¹Ï
[attach]18779[/attach]
§@ªÌ: Amin    ®É¶¡: 2014-7-29 12:11

¦^´_ 11# Amin

¿ù»~°T®§¤w©ú½T»¡©ú¡A¦p¹Ï
[attach]18785[/attach]

§O¤Hªº½d¨Ò¥i¥Hwork¡A¦pªþ¥ó
[attach]18786[/attach]

½Ð°ÝGBKEE¤j¤j¡A¸Ó«ç»ò¤~¯àÅý§Úªº½d¨Ò¦b¤£²K¥[OLEObjects±¡ªp¤U¤]¯àwork¡A¦p¹Ï
[attach]18784[/attach]

·PÁÂ
§@ªÌ: stillfish00    ®É¶¡: 2014-7-29 20:06

¦^´_ 12# Amin
§A©Ò¿×¥i¥Hworkªº½d¨Ò¡A¬O¦]¬°¥L¤w¸g¤â°Ê¥[¤J¤@­ÓWebBrowserªº±±¨î¶µ¤F
¥u¬O¥L§â¨º­Ó±±¨î¶µªº¼e©M°ªÁY¤pÅý§A¬Ý¤£¨£¦Ó¤w...
©Ò¥H§A¦Û¤v¤â°Ê¥[¤J±±¨î¶µ´N¥i¥H¤F...
§@ªÌ: Amin    ®É¶¡: 2014-7-29 21:40

¦^´_ 13# stillfish00


stillfish00¤j·PÁ§Aªº¦^ÂÐ

½Ð°Ý¦³¿ìªk¬d¬Ý¥Xª«¥óªº¼Ë¤l¶Ü?©Î¬O¹Ï¤ù?
§@ªÌ: stillfish00    ®É¶¡: 2014-7-30 01:11

¦^´_ 14# Amin
Sub Test()
    Sheet1.WebBrowser1.Width = 400
    Sheet1.WebBrowser1.Height = 200
End Sub
²³æ½Õ¾ã¼e°ª´N¥X²{¤F
[attach]18789[/attach]
§@ªÌ: Amin    ®É¶¡: 2014-7-30 09:00

¦^´_ 15# stillfish00

stillfish00¤j¤j ªGµM«Ü±j

½Ð°Ý¤@©w­n¥Îµ{¦¡¤~¯à¬Ý¨ì¶Ü?
¯à§_³z¹L³]­p¼Ò¦¡¬d¬Ý?
§Ú¸Õ¤F«Ü¤[¤]Åã¥Ü¤£¥X¨Ó
§@ªÌ: IQ2008    ®É¶¡: 2014-8-6 18:15

§Æ±æ³o¤@½g¦³À°§U

http://excelvbaandmacros.blogspot.tw/2012/02/excel-browse-internet-in-excel.html
§@ªÌ: ¦Ñ®L    ®É¶¡: 2014-8-23 09:13

¥»©«³Ì«á¥Ñ ¦Ñ®L ©ó 2014-8-23 09:15 ½s¿è

WebBrowser1¥»¨­´N¬Oª«¥ó,¥i¥Hª½±µ¨Ï¥Î,¥Î¤£µÛVBA±±¨î
//¥¦´N¬OµL¥\¯àªí¤§IE

¥¬¸mWebBrowser1,ÁY¤pExcelµøµ¡,©Ô¤J¸ê®Æ§¨,§Y¥i¨Ï¥ÎÀÉ®×Á`ºÞ¤§©Ò¦³¥\¯à

©Ô¤J.htm,§Y¬Oºô­¶
//·íµM¥Îhtm»yªk¼g,¦Ó«Dvba

³o¥s°µOLE,¤£¦PªF¦è©Ô¤@©Ô,¥s°µÃø
§@ªÌ: ¦Ñ®L    ®É¶¡: 2014-8-23 09:49

http://club.excelhome.net/thread-491617-1-1.html

[attach]19007[/attach]
§@ªÌ: ¦Ñ®L    ®É¶¡: 2014-8-23 14:05

µ{¦¡½X¤@¦æ·d©w

Private Sub CommandButton1_Click()
WebBrowser1.Navigate "http://www.youtube.com/embed/bV7nFXhL8QY?feature=player_detailpage"
End Sub

Private Sub CommandButton2_Click()
WebBrowser1.Navigate "C:\"
End Sub


//VBA¥u¬O¥Î­Ó®Ø¬[­¶¶W³sµ²¦Ó¤w,¨S¬Æ»ò¤j¾Ç°Ý
[attach]19011[/attach]




Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)