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

[µo°Ý] DDE¸ê®Æ¬ö¿ý°ÝÃD

¦^´_ 17# GBKEE

¦A¦¸«D±`·PÁÂGBKEE¤j¤jªº¼ö¤ß¨ó§U
©ú¤Ñ¶}½L¦A¸Õ¬Ý¬Ý,ÁÂÁ±z
stock

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-7-16 07:09 ½s¿è

¦^´_ 16# usana642
  1. Option Explicit
  2. Sub Auto_Open() '¶}Àɮɦ۰ʰõ¦æ¦¹¥¨¶°
  3.     GetDDE  '©I¥sµ{§Ç
  4. End Sub
  5. Sub GetDDE()
  6.     Dim T As Date, A
  7.     'T = Now  'Now ¥]§t¤é´Á     >1,,' T = Time '¥u¦³24¤p®Éªº¼Æ­È <1
  8.     '¿é¤J  #9:00#  ->¨t²Î¦Û°Ê¦¨  #9:00:00 AM#
  9.     '¿é¤J  #13:00# ->¨t²Î¦Û°Ê¦¨  #1:00:00 PM#
  10.     '¿é¤J  #00:05# ->¨t²Î¦Û°Ê¦¨  #12:05:00 AM#   :  5¤ÀÄÁ
  11.     '------  1.¦A¥[¤J¥xªÑ©Î¬üªÑ¶}¦¬½L®É¶¡,¨Ó³]©w±µ¦¬®É¶¡
  12.     If Time > #9:00:00 AM# And Time < #1:30:00 PM# Then    '©ó¥æ©ö®É¶¡¤º
  13.         If Not IsError(Sheets(1).[B2]) Then Sheets(2).[A65536].End(xlUp).Offset(1).Resize(, 7) = Sheets(1).[A2:G2].Value  '¤u§@ªí1ªº¸ê®ÆDDE³sµ²¦¨¥\¼g¤J¤u§@ªí2
  14.     '------  2.±N±µ¦¬¶i¨Óªº¸ê®Æ®É¶¡­×¥¿¬°" ¤ÀÄÁ¾ã¼Æ",¨Ò¦p 10:15:10  ---> 10:15:00
  15.     End If
  16.     T = Time + #12:00:30 AM#                         '--¶¡¹j30¬í---------
  17.     'T = Time + #12:01:00 AM#                         '--¶¡¹j1¤ÀÄÁ---------
  18.     'T = Time + #12:05:00 AM#                         '--¶¡¹j5¤ÀÄÁ---------
  19.     Application.OnTime T, "GetDDE"
  20. End Sub
½Æ»s¥N½X

TOP

¦^´_ 15# GBKEE


    ¤£¦n·N«ä,§Ú´N¬O«ö·Ó¶W¯Åª©¥Dªºµ{¦¡,µ{¦¡¦p¤U:

Sub auto_open()'¶}Àɮɦ۰ʰõ¦æ¦¹¥¨¶°
GetDDE  '©I¥sµ{§Ç
End Sub
Sub GetDDE()
Dim T As Date
T = Now  '¨ú±o²{¦b®É¶¡
If Not IsError(Sheets(1).[B2]) Then Sheets(2).[A65536].End(xlUp).Offset(1).Resize(, 7) = Sheets(1).[A2:G2].Value  '¤u§@ªí1ªº¸ê®ÆDDE³sµ²¦¨¥\¼g¤J¤u§@ªí2
Application.OnTime T + TimeValue("00:00:02"), "GetDDE"  '³o¬O¥H2¬í´ú¸Õ¡A¶¡¹j5¤ÀÄÁ§ï¦¨TimeValue("00:05:00"),
End Sub

§Ú·Q

1.¦A¥[¤J¥xªÑ©Î¬üªÑ¶}¦¬½L®É¶¡,¨Ó³]©w±µ¦¬®É¶¡
2.±N±µ¦¬¶i¨Óªº¸ê®Æ®É¶¡­×¥¿¬°" ¤ÀÄÁ¾ã¼Æ",¨Ò¦p 10:15:10  ---> 10:15:00

½Ð°Ý­n¦p¦ó­×§ï?ÁÂÁ±zªº¨ó§U
stock

TOP

¦^´_ 13# 14# usana642
¥iªþÀɤW¨Ó¬Ý§A¦p¦ó¼gªº
PS:½Ð«ö¦^´_Áä ¦^¤åªÌ¤~·|ª¾¹Dªº

TOP

¦A½Ð±Ð¤@­Ó°ÝÃD,¦p¦ó±N±µ¦¬¶i¨Óªº¸ê®Æ®É¶¡­×¥¿¬°" ¤ÀÄÁ¾ã¼Æ",¨Ò¦p 10:15:10  ---> 10:15:00 ,½Ð°Ý­n¦p¦ó­×§ï?ÁÂÁ¨ó§U...
stock

TOP

«D±`·PÁÂGBKEE¤j¤jªº¼ö¤ß¤À¨É,¤w¸g¦¨¥\¤F,¥t¥~¦A½Ð±Ð,¦pªG­n¥[¤J¥xªÑ©Î¬üªÑ¶}¦¬½Lªº±µ¦¬®É¶¡,½Ð°Ý­n¦p¦ó­×§ï?ÁÂÁ±z
stock

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-6-22 08:25 ½s¿è

¦^´_ 11# usana642
¥»¨­ªº¼Ò²Õ¤¤ ª½±µ©I¥s  µ{§Ç¦WºÙ§Y¥i ->  GetDDE

ª«¥ó¼Ò²Õ¤º :¤u§@ªíª«¥ó¼Ò²Õ (SHEET1 . SHEET2.....) , ¬¡­¶Ã¯ª«¥ó¼Ò²Õ ThisWorkbook ,¤¤
¤½¥Î:   Sub  GetDDE ()  =    Public Sub  GetDDE ()     Public  ¼Ò²Õ¼h¦¸ªºÃöÁä¦r¡A¥Î¨Ó«Å§i¦b©Ò¦³¼Ò²Õùتº©Ò¦³µ{§Ç¤¤³£¥i¥H¨Ï¥Î±`¼Æ
¦b¨ä¥L¼Ò²Õªºµ{§Ç¤¤ ¥G¥sGetDDE    ->    SHEET1.GetDDE
¨p¥Î:  Private  Sub  GetDDE ()                                        Private ¼Ò²Õ¼h¦¸ªºÃöÁä¦r¡A¥Î¨Ó«Å§i¥u¦b¤w«Å§iªº¼Ò²Õùؤ~¥i¥H¨Ï¥Î±`¼Æ
¦b¨ä¥L¼Ò²Õªºµ{§Ç¤¤ ¥G¥sGetDDE   ->     Run  "SHEET1.GetDDE"

¤@¯ë¼Ò²Õ¤º :   Module1,¤¤
Sub  GetDDE ()  =    Public Sub  GetDDE ()     ¦b¨ä¥L¼Ò²Õªºµ{§Ç¤¤ ¥G¥sGetDDE  ->      GetDDE
¨p¥Î:  Private  Sub  GetDDE ()     ¦b¨ä¥L¼Ò²Õªºµ{§Ç¤¤ ¥G¥sGetDDE    ->    Run  "Module1.GetDDE"

TOP

½Ð°Ý§Ú°õ¦æµ{¦¡®É,¬°¦ó·|¸õ¥X''§ä¤£¨ì¥¨¶°GetDDE''ªºÄµ§iµøµ¡?Àµ½Ð¦U¦ì¤j¤jªº¦^ÂÐ,ÁÂÁÂ

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-4-27 08:39 ½s¿è

¦^´_ 9# c_c_lai

°ÊºA·s¼W¤u§@ªí¬°¥Øªº¤u§@ªí®É¡A¹w³]®æ¦¡³q±`¬O¥H³q¥Î®æ¦¡
¦pªG¤£Ä@·N¨Ï¥Îµ{¦¡½X©ó·s¼W¤u§@ªí®É³]©w®æ¦¡
¥i¥ý»s§@¦nÀ³¦³®æ¦¡ªº¤u§@ªí§@¬°½d¥»
©ó·s¼W¤u§@ªí®É¥H´¡¤J½d¥»¬°¤§
Á`¤§¡A¤@¦¸©ÊÂà¼g¸ê®Æ®ÉÀ³¥HvalueÄݩʼg¤J¡A¤£±o¥Htext¼g¤J
­Y­n¥Htext¼g¤J«h¥²¶·¤@®æ¤@®æ¼g¤J

Sheets("Good Morning").[A].Formula = "hh:mm:ss"
§ó§ï®æ¦¡³o¼Ëªº»yªk¬O¿ù»~ªº¡A«Øij§A¥ý¥H¿ý»s¥¨¶°¤è¦¡¡A¨ú±o°ò¥»µ{¦¡½X
±z¦³¨ä¥Lµ{¦¡»y¨¥°ò¦¡AÅÞ¿è·§©ÀÀ³¸Ó¤£¬O°ÝÃD
§A¥i±q¼ô±xEXCELªº°ò¥»¾Þ§@¡A¥h¤F¸ÑEXCEL VBAªº¯S®í¨ç¼Æ¤Îª«¥óÄÝ©Ê
¦]¬°»yªk´N¬OVB»yªk¡A©Ò¥H¡A°ò¥»¥\¯à¤F¸Ñ¶V¦h¡A§AªºVBA¹B¥Î¤~·|¶VÆF¬¡
~¦@«j¤§~
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 8# Hsieh
¹ê°È¤W¡A³Q¼g¤JºÝ¥¼¥²¥u¦³ "¤u§@ªí³æ2"¡A¦³¥i¯à¬O°ÊºA²£¥Íªº¤u§@ªí³æ¡A
¬Æ©Î¬O¨C¤é¤@¥÷¤£¦P¤§¤u§@ªí³æ¨Ó°O¿ý¥æ©ö¬ö¿ý¡A¨Ì·Ó±zªº·N«ä¬O¥ý¦æ±N¦¹Äæ¦ì
±N¥¦¥ý¤©¥H®æ¦¡¤Æ¦A¦æ³B²z¶Ü¡H ¬O¤£¬O³o¼Ë¡H  Sheets("Good Morning").[A].Formula = "hh:mm:ss"
(¹ï¤£°_¡A§Ú¤§«e³£¨S±µÄ²¹L Excel¡A¬O³Ìªñ¤~¶}©l¸ò¦U¦ì¥ý¶i¾Ç²ßªº¡A ¥B¥Ø«e¤§ VBA µ{¦¡»yªk³£¬O¾ÌÂÇ¥H©¹ªº¨ä¥¦»y¨¥ªº¼¶¼g¸gÅç¨Ó±Ä¼¯ªº)
¦p¦¹¶Õ¥²¨C¦b²£¥Í¤@¤ßªí³æ¤§«e¡A´N­n¥ý¦æ³B²z¦¹®æ¦¡¤Æ¡A¦ý¬O A1¥»Äæ¬O¤å¦rÄݩʱԭz¨º¨SÃö«Y¶Ü¡H

TOP

        ÀR«ä¦Û¦b : ¡i®É¤é²öªÅ¹L¡j¤@­Ó¤H¦b¥@¶¡°µ¤F¦h¤Ö¨Æ¡A´Nµ¥©ó¹Ø©R¦³¦hªø¡C¦]¦¹¥²¶·»P®É¶¡Ävª§¡A¤Á²ö¨Ï®É¤éªÅ¹L¡C
ªð¦^¦Cªí ¤W¤@¥DÃD