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

[µo°Ý] ¯à§_¨Ì²{¦³ªºVBA³Ð¥X¥t¤@­ÓVBA©O?

[µo°Ý] ¯à§_¨Ì²{¦³ªºVBA³Ð¥X¥t¤@­ÓVBA©O?

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-5-31 08:49 ½s¿è

²{¦³ªºVBA: http://naturefruit.myweb.hinet.net/map.xls
¨Ï¥Î»¡©ú: ½ÐÂI¨â¤UBÄ檺Àx¦s®æ(¥ô·N®æ).Àx¦s®æ¥²¶·¦³­È.

«Ý§¹¦¨ªº¹Ï:
§Æ±æ¥i¥H§Q¥Î²{¦³ªºVBAªº­ì²z.±N«Ý§¹¦¨ªº¹Ï¤ºªºA1~R1¥N¤JÀx¦s®æAÄæ~RÄæ.
±N­ì¦³ªºÂI¨â¤UÀx¦s®æ§ó§ï¬°.¦bB1¥´¤J¸ê®Æ«á«öEnter©Î§Ö±¶Áä(¦p:Ctrl+F1).§Y¥i¸õµ¡Åã²{.
¦pªG¸õµ¡Åã²{ªº³¡¤À¨S¿ìªkªº¸Ü.½Ð§ó§ï¦^ÂI¨â¤UBÄæÀx¦s®æ(¥ô·N®æ).Àx¦s®æ¥²¶·¦³­È.

·PÁ¦U¦ì¤j¤jªºÀ°¦£.

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-5-31 11:28 ½s¿è

¦^´_ 1# vpower


   ³o­Ó°ÝÃDÄpµ²¦b©ó¤å¦r½s½XÂà´«
¥H¼Ó¥D´£¨Ñ¹Ï¤ù¬°¨Ò
·j´MÃöÁä¦r¬O"¤k"
ºô§}¦C°Ñ¼Æ"¤k"³QÂনutf-8½s½X %E5%A5%B3
¦b¦¹½Ð±Ð¦U¦ì¥ý¶i
big5ªº¤å¦r¸Ó¦p¦óÂনutf-8¥N½X©O?
¥Îgoogle·j¨ìapi¨ç¼Æ¤¤
MultiByteToWideChar ©M WideCharToMultiByte ¬O¦³ÃöÂà½Xªº¨ç¼Æ
½ÐÀ´±o¨Ï¥Î¦¹2¨ç¼Æªº«e½ú«ü±Ð
¦p¦ó±N
¤k¡÷%E5%A5%B3
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ vpower ©ó 2010-5-31 23:50 ½s¿è
¦^´_  vpower


   ³o­Ó°ÝÃDÄpµ²¦b©ó¤å¦r½s½XÂà´«
¥H¼Ó¥D´£¨Ñ¹Ï¤ù¬°¨Ò
·j´MÃöÁä¦r¬O"¤k"
ºô§}¦C°Ñ¼Æ ...
Hsieh µoªí©ó 2010-5-31 09:23



²{¦³ªºVBA: http://naturefruit.myweb.hinet.net/map.xls
¨Ï¥Î»¡©ú:
ÂI2¤UBÄæ.¦p A¦a ©Î ¥x¥_¥«©¾§µªF¸ô1¬q20¸¹
¥L³£·|¥t¥~¶} http://maps.google.com.tw/ ºô­¶
ºô­¶¤ºªº·j´M²Ä¤@®æ´N·|©ñBÄæ¦ì.²Ä¤G®æ´N·|©ñCÄæ
§Ú¤£¾å±o¤j¤j¯à¤£¯à§Q¥Îµ{¦¡½X¦p¤U:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Target.Column = 2 And Target.Value <> "" Then
        If Target.Range("B1") <> "" Then
            Cancel = True
            With CreateObject("InternetExplorer.Application")
                .Navigate "http://maps.google.com.tw/"
                Do While .Busy Or .ReadyState <> 4
                    DoEvents
                Loop
                .Document.all("d_d").innerText = Target
                .Document.all("d_daddr").innerText = Target.Range("B1")
                .Document.all("d_sub").Click
                .Visible = True
            End With
        End If
    End If
End Sub
¹ï©óµ{¦¡½X§Ú¤]³Â·Ð¤H®a¼gªº.¤]¨Ã«D«Ü¤F¸Ñ.¦n¹³©MPD961A¤j¤jÁ¿ªº¤@¼Ë.­n¬d¥Lªº­ì¤å.

·j´MÃöÁä¦r¬O"¤k"
´N¦b§Ú¼Ð©úC1ªº³¡¤À.
¯à¤£¯à³Â·ÐPD961A¤j¤j¸Ô²ÓÁ¿¸Ñ¤@¤U²{¦³ªºVBAªºµ{¦¡½X.
§Ú°ß¤@¤F¸Ñªº´NIf Target.Column = 2 And Target.Value <> "" Then
¥Lªº2¥NªíBÄæ.

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-6-1 14:54 ½s¿è

¦^´_ 6# vpower


ºô­¶¬[ºc¤£¦P,³oºØºô­¶ªº¬d¸ß
¬O±N¬d¸ß°Ñ¼Æª½±µ¼g¨ìºô§}¤º
¤£¹Lºô­¶ªº°Ñ¼Æ±Ä¥Îutf_8½s½X
­YexcelÀx¦s®æ¤º¿é¤Jbig5¥²»ÝÂনutf_8¤Q¤»¶i¦ì½X¤~¯à¥N¤J
¦bºô¸ô¤W§ä¨ìapi¨ç¼ÆªºWideCharToMultiByte¨ç¼Æ
¦ýÂà¥X¨Ó´N¬O¸òºô§}¦Cªº¤£¦P
½Ð«e½ú«ü¾É¸Ó¦p¦ó­×¥¿µ{¦¡
  1. Private Const CP_UTF8 = 65001

  2. 'Private Declare Function MultiByteToWideChar Lib "kernel32" (ByVal CodePage As Long, ByVal dwFlags As Long, ByVal lpMultiByteStr As Long, ByVal cchMultiByte As Long, ByVal lpWideCharStr As Long, ByVal cchWideChar As Long) As Long
  3. Private Declare Function WideCharToMultiByte Lib "kernel32" (ByVal CodePage As Long, ByVal dwFlags As Long, ByVal lpWideCharStr As Long, ByVal cchWideChar As Long, ByVal lpMultiByteStr As Long, ByVal cchMultiByte As Long, ByVal lpDefaultChar As Long, ByVal lpUsedDefaultChar As Long) As Long

  4. Public Function UTF8_Encode(ByVal Text As String) As String

  5. Dim sBuffer As String
  6. Dim lLength As Long
  7. Dim mystr()

  8. If Text <> "" Then
  9. lLength = WideCharToMultiByte(CP_UTF8, 0, StrPtr(Text), -1, 0, 0, 0, 0)
  10. sBuffer = Space$(lLength)
  11. lLength = WideCharToMultiByte(CP_UTF8, 0, StrPtr(Text), -1, StrPtr(sBuffer), Len(sBuffer), 0, 0)
  12. sBuffer = StrConv(sBuffer, vbUnicode)
  13. UTF8_Encode = Hex(Asc(Left$(sBuffer, lLength - 1)))
  14. Else
  15. UTF8_Encode = ""
  16. End If
  17. End Function
½Æ»s¥N½X
uft_8.rar (7.17 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# Hsieh


    ¤s¤£Âà¸ôÂà,¸ô¤£Âà§ÚÂà
¸g¶{ª©¥D´£ÂI,utf_8¦æ¤£³q,¥Îutf_5´N¥iª½±µ¥Î¤¤¤å¦r
¦pªþ¥ó map.rar (12.04 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ vpower ©ó 2010-6-3 19:34 ½s¿è

«D±`·PÁ±zªº¥Î¤ß..
¥i±¤§Ú¾\ŪÅv­­¤£¨¬..

TOP

        ÀR«ä¦Û¦b : ¦³´¼¼z¤~¯à¤À¿ëµ½´c¨¸¥¿¡F¦³Á¾µê¤~¯à«Ø¥ß¬üº¡¤H¥Í¡C
ªð¦^¦Cªí ¤W¤@¥DÃD