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

[µo°Ý] ¦p¦ó±N±qEXCEL¤ºªº¸ê®Æ¶K¤Jºô¯¸¤¤(¹Lµ{³£¥ÑVBA¦Û°Ê°õ¦æ)

[µo°Ý] ¦p¦ó±N±qEXCEL¤ºªº¸ê®Æ¶K¤Jºô¯¸¤¤(¹Lµ{³£¥ÑVBA¦Û°Ê°õ¦æ)

·s°ÝÃD.rar (10.19 KB)
¥D­n·QÅý¬õ°é³B ªº¸ê®Æ  ½Æ¨î>>¥´¶}¥k¤W¤èªººô§}>¦A¶K¤W«á«ö¤U submit  


³Ì¦nÁÙ¯à±N¤U­±¬õ°é³B¤Gµ§ISK ¤]³£¶Ç¦^EXCEL¤W

¤£ª¾¦³¨S¦³ªk¤l¯à°µ¨ì©O? ·PÁÂÀ°¦£¤F

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2013-10-18 16:22 ½s¿è

¦^´_ 1# icestormer
  1. Sub Test()
  2.   Dim oIe, myData As DataObject, x
  3.   
  4.   Set myData = New DataObject  '»Ý¤Þ¥Î MS Form Object Library
  5.   
  6.   With Sheets("°ÝÃD")
  7.     .Range(.[A4], .[F4].End(xlDown)).Copy
  8.   End With
  9.   myData.GetFromClipboard
  10.   
  11.   Set oIe = CreateObject("internetExplorer.Application")
  12.   With oIe
  13.     '.Visible = False
  14.     .navigate "http://www.evepraisal.com"
  15.     Do While oIe.readystate <> 4: DoEvents: Loop
  16.    
  17.     .document.getElementById("raw_textarea").innerText = myData.GetText '¶ñ¤J
  18.     .document.getElementById("result_submit").Click 'submit
  19.    
  20.     Application.Wait Now + TimeValue("00:00:05")  'µ¥«Ý5¬í§¹¦¨
  21.    
  22.     Set x = .document.getElementById("result_container")
  23.     MsgBox x.All.tags("h4")(0).innerText
  24.     .Quit
  25.   End With
  26.   
  27. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# stillfish00


   


§A¦n §Ú¤£¤ÓÀ´°ÝÃD¥X¦b¨º ¦ý§Ú¤~¶]²Ä¤@¦æ´N¥X²{ ¤W¹Ïªº°ÝÃD ½Ð°Ý§Ú­n«ç°µ©O??

TOP

¦^´_ 3# icestormer
¦p stillfish00 ¤§¸Ñ»¡¡G ¨Ï¥Î DataObject «Å§i¡A¶·¤Þ¥Î Microsoft Form Object Library
§A¥ýÀˬd¸Ó Library ¬O§_¤w¸g¤Ä¿ï¡A §_«h°õ¦æ®É·|²£¥Í "¥¼©w¸q" ªº°T®§¡A§Ú±N¦p¦ó¤Þ¥Î
ªº¤èªk¡A»¡©ú¦p¤U¡A§Æ±æ¹ï§A·|¦³©ÒÀ°§U¡C
  1. 1.  ¶}µo¤H­û  --->   ¤u¨ã   --->  ³]©w¤Þ¥Î¶µ¥Ø   --->   ¥i¤Þ¥Îªº¶µ¥Ø(A)
  2. 2.  µM«áÆ[¹î Micorsoft Forms 2.0 Ojbect Library ¦³§_¤Ä¿ï¡H
  3. 3.  ¦pªG¸Ó¶µ¥Ø¤£¦s¦b!
  4. 4.  «hÂI¿ï "ÂsÄý" ¿ï¶s   --->   ·s¼W¤Þ¥Î¶µ¥Ø - VBAProject¡A
  5.     ·j´M¦ì¸m(I) «ü¦V Windows/System32\FM20.dll¡A ±µµÛ¦AÂI¿ï
  6.     "¶}±Ò" «K·|¦Û°Ê¤Ä¿ï Micorsoft Forms 2.0 Ojbect Library ¤F¡C
½Æ»s¥N½X
¯¬§A¤@¦|­·¶¶¡I

TOP

¦^´_ 4# c_c_lai


   §A¦n  §Ú¬O¥Î2003ªº ¦ý§Ú§ä¤£¨ì§A»¡ªº ¶}µo¤H­û ¿ï¶µ©O

TOP

¦^´_ 5# icestormer
§Ú¤âÀY¤W¨Ã¨S¦³ 2003 ªºª©¥»¡A¦³Ãö³o¤è­±
§A¥i¯à­n¥h½Ð±Ð GBKEE ª©¤j¤F¡A¦]¬°¥L¤]¬O
¨Ï¥Î 2003 ªºª©¥»¡C

TOP

¦^´_  icestormer
§Ú¤âÀY¤W¨Ã¨S¦³ 2003 ªºª©¥»¡A¦³Ãö³o¤è­±
§A¥i¯à­n¥h½Ð±Ð GBKEE ª©¤j¤F¡A¦]¬°¥L¤]¬O
...
c_c_lai µoªí©ó 2013-10-19 08:04



   ¨º½Ð°Ý§Ú­n«ç§ä¥L©O? ¬O¼g«Hµ¹¥L? (§ÚÁÙ¨S¥Î¹L³oÃþªº¥\¯à~~)

TOP

¦^´_ 7# icestormer
§Ú¥u·|¹ï®×¨Ò¦^´_¡A¦Ü©ó¥­±`¦p¦ó©I¥s¯uªº¤£ª¾¦p¦óÁpô¡C
¦ý§Ú§ä¨ì¤F¨â½g¦³Ãö¸Ñ¨M¤è®×¡A´£¨Ñ§A°Ñ¦Ò¡G
  1. Actually it's a member of msforms library, not from native vba.

  2. you can use it without a userform but you'll need a reference
  3. to Microsoft Forms Object Library. The reference is automatically added
  4. to a workbook when you insert a Userform from VBeditor's Insert menu.
½Æ»s¥N½X
  1. Problem

  2. An Excel VBA subroutine that involves interaction with the Windows Clipboard fails to run with the error:
  3. ¡§Compile error: User-defined type not defined.¡¨  The line of code highlighted by Excel as
  4. being the cause of the error includes a reference to the ¡§DataObject¡¨ object type.

  5. Solution

  6. (Tested on my machine with Excel 2003 SP3)

  7. In the Microsoft Visual Basic editor:

  8.     Stop debugging by clicking the ¡§Stop¡¨ button on the toolbar (if debugging isn¡¦t already stopped).
  9.     Tools menu | References
  10.     In the list of available references, find ¡§Microsoft Forms 2.0 Object Library¡¨, check it, and click OK.  (For me, this was the 2nd unchecked item from the top of the list; it wasn¡¦t sorted alphabetically in the list like most of the rest of the listed items.)
  11.     Run the macro again.

  12. That¡¦s it!  Hope this helps!
½Æ»s¥N½X

TOP

¦^´_ 7# icestormer
¬°¤è«K¾\Äý¡A¯S±N¥¦Â½Ä¶¦p¤U¡G
  1.     Actually it's a member of msforms library, not from native vba.
  2.     (½T¹ê¥¦¬O·L³nªí³æµ{¦¡®wªº¤A­û¡A¦Ó«D VBA ªº¥Í¦¨¤¸¥ó)

  3.     you can use it without a userform but you'll need a reference
  4.     to Microsoft Forms Object Library. The reference is automatically added
  5.     to a workbook when you insert a Userform from VBeditor's Insert menu.
  6.     (§A¥i¥H¤£»Ýªí³æ¦Ó¥h¨Ï¥Î¥¦¡A¦ý¬O§AÁÙ¬O¶·­n°Ñ¦Ò¨ì·L³nªºªí³æª«¥óµ{¦¡®w¡C
  7.      ·í§A±qVB½s¿è´¡¤J¿ï³æ¤º´¡¤J¤@±iªí³æ®É¡A¦¹°Ñ¦Ò¶µ·|¦Û°Ê¥[¤J¨ì¬¡­¶Ã¯¸Ì¡C)


  8.     Problem (°ÝÃD)

  9.     An Excel VBA subroutine that involves interaction with the Windows Clipboard fails to run with the error:
  10.     ¡§Compile error: User-defined type not defined.¡¨  The line of code highlighted by Excel as
  11.     being the cause of the error includes a reference to the ¡§DataObject¡¨ object type.
  12.     (·í¤@­Ó¸Õºâªí VBA µ{¦¡¬q¤º²[»\µøµ¡°Å¶K蠟Ãìµ²©ó°õ¦æ®É²£¥Í¿ù»~¡G"µ{¦¡½s¿è¿ù»~¡G¨Ï¥ÎªÌ¦Û­q«¬ºA©|¥¼©w¸q"¡C
  13.      ¤Ï¥Õ¼Ð¥Üµo¥Í¿ù»~ªº³o¦æ¬O¦b»¡©ú¥¦¦b°Ñ·Ó "¸ê®Æª«¥ó (¡§DataObject¡¨)" ®Éµo¥Í¤F°Ñ·Ó¿ù»~¡C)

  14.     Solution (¸Ñ¨M¤è®×)

  15.     (Tested on my machine with Excel 2003 SP3) (¤w¸g¦bExcel 2003 SP3´ú¸Õ¹L)

  16.     In the Microsoft Visual Basic editor: (¦b·L³nªº VB ½s¿è¾¹¤º)

  17.         Stop debugging by clicking the ¡§Stop¡¨ button on the toolbar (if debugging isn't already stopped).
  18.         (°±¤î°»¿ù¼Ò¦¡¡A§Y¿ï«ö¤u§@¦C¤Wªº "°±¤î" ¶s²×¤î°»¿ù)
  19.         Tools menu | References  (¤u¨ãµæ³æ  |  °Ñ¦Ò¶µ¥Ø )
  20.         In the list of available references, find ¡§Microsoft Forms 2.0 Object Library¡¨, check it, and click OK.
  21.         ¦b°Ñ¦Ò¦C¥Ü¶µ¥Ø¿ï³æ¤º¡A§ä´M¡§Microsoft Forms 2.0 Object Library¡¨¡A§ä¨ì«áÂI¿ï¥¦´N§¹¦¨¤F¡C
  22.         (For me, this was the 2nd unchecked item from the top of the list; it wasn't sorted alphabetically
  23.          in the list like most of the rest of the listed items.)
  24.         Run the macro again. (¦A­«·s°õ¦æ¥¨¶°)

  25.     That's it!  Hope this helps!  (´N³o¼Ë¡I §Æ±æ¹ï§A¦³©ÒÀ°§U¡I)
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-10-19 16:39 ½s¿è

¦^´_ 7# icestormer
¼Ò²Õ´¡¤Jªí³æ´N¥i¥H¤F

·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD