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

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

¦^´_ 2# stillfish00


    Dear S ¤j

§Ú·Q½Ð°Ý  Ãö©óºô­¶ª«¥óªº³o­Ó¼gªk¸Ì­±

.document.getElementById("raw_textarea").innerText = myData.GetText '¶ñ¤J
    .document.getElementById("result_submit").Click 'submit

³o¨â¦æ¦rªº¸ÑÄÀ¡AÀ³¸Ó­n¥hmsdnªº­þ¸Ì¬d¸ß  ©Î¬O±q­þ­Óª«¥ó¥h¤F¸Ñ

§Ú±`±`¬Ý¨ì§A­Ì»PG¤j&H¤j ³£¯à°÷¹B¥Î¦Û¦p

§ÚÁÙ¦b¾Ç²ßªº¹Lµ{·í¤¤¡Aµo²{¬d§ä¸ê®Æ¬O³ÌÃøªº¤@Àô¡A³Ñ¤U¨ÓªºÀ³¥Î¡A¬Ý½d¨ÒÀ³¸Ó³£¯à²¤ª¾¤@¤G ºCºC²z¸Ñ

½Ð°Ý³o­Ó³¡¤À °²³]§Ú¬O·s¤â¡A·Q­n¤F¸Ñºô­¶ª«¥ó¥Îªk¡AÀ³¸Ó±q­þ­Ó¦a¤è¤Á¤J

ÁÂÁ±zªº«ü±Ð^^

TOP

¦^´_ 12# c_c_lai


   °ÝÃD³£¸Ñ¨M¤F ·PÁ¦U¦ì!

TOP

¦^´_ 11# icestormer
  1.       '  MsgBox x.All.tags("h4")(0).innerText
  2.       [L22] = x.All.tags("h4")(0).innerText
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ icestormer ©ó 2013-10-19 21:26 ½s¿è

Sub Test()
  Dim oIe, myData As DataObject, x
  
  Set myData = New DataObject  '»Ý¤Þ¥Î MS Form Object Library
  
  With Sheets("°ÝÃD")
    .Range(.[A4], .[F4].End(xlDown)).Copy
  End With
  myData.GetFromClipboard
  
  Set oIe = CreateObject("internetExplorer.Application")
  With oIe
    '.Visible = False
    .navigate "http://www.evepraisal.com"
    Do While oIe.readystate <> 4: DoEvents: Loop
   
    .document.getElementById("raw_textarea").innerText = myData.GetText '¶ñ¤J
    .document.getElementById("result_submit").Click 'submit
   
    Application.Wait Now + TimeValue("00:00:05")  'µ¥«Ý5¬í§¹¦¨
   
    Set x = .document.getElementById("result_container")
  MsgBox x.All.tags("h4")(0).innerText

½Ð°Ý¤@¤U MSGBOX³o¦æ ¦pªG­n§âµ²ªG¼g¤J L22®æ¤º ­n«ç¼g ©O?(¤£­nÅã¥Ü¦bMSGBOX¤W) ·PÁÂ

    .Quit
  End With
  
End Sub

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

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

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

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

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

TOP

¦^´_ 4# c_c_lai


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

TOP

        ÀR«ä¦Û¦b : ¯à¥I¥X·R¤ß´N¬OºÖ¡A¯à®ø°£·Ð´o´N¬O¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD