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

½Ð°Ý¤@­Ó¹ÏªíÀH®É¶¡¨B¶iªº¤@­Óvba°ÝÃD

½Ð°Ý¤@­Ó¹ÏªíÀH®É¶¡¨B¶iªº¤@­Óvba°ÝÃD

§Ú§Æ±æ°µ¤@­Ó²{³f¥H¤Î´Á³fªº»ù®tªí
¼Æ¾Ú±qdde±µ¦¬¶i¨Ó
³sµ²¨ì¤u§@ªí1ªºb2©Mb3
¨C¶¡¹j¤@¤ÀÄÁ¬ö¿ý¤@¦¸

¨Ã±N«ü¼Æ·|»s¦¨¹Ïªí,¨Ã¥B¥uÅã¥Ü³Ì·sªº60µ§¸ê®Æ
§Ú¼g¦b
Private Sub Worksheet_Calculate()¤§¤U

¥´¶}«áµo²{¤£·|°Ê!!!¦ý¬O¥u­n§Ú¦b¤u§@ªí°µ­Ó§R°£¦Cªº°Ê§@!!
´N·|¥¿±`§@°Ê!!

½Ð°Ý¬O§_¬O¦]¬°§Ú¨Ã¤£¬O¦bdde¥¿±`¦ê±µ®É¶¡,©Ò¥H¤£·|¥¿±`§@°Ê
©ÎªÌ¦]¬°¨ä¥L°ÝÃD©O?

ªþ¤WÀɮ׽Хý¶i«üÂI!!¦³³Ò¤F!!

test.rar (24.21 KB)

§R°£¦C -> Worksheet_Calculate ·|°õ¦æ
dde°Ê  -> Worksheet_Calculate ·|°õ¦æ

TOP

¦^´_ 1# laieven
DDE ªº«ü©w¿é¤JÄæ¦ì¸ê®Æ¶×¤J©Î²§°Ê¡A ¸g´ú¸Õ¸gÅç Worksheet_Change
¥H¤Î Worksheet_Calculate ³£¤£·|³QIJ°Êªº¡C
¤@¯ë¸Ñ¨M¤§¹D¡A¬O¥Î©w®É±½´y¤è¦¡¨Ó³B²z¦¹¤@§x´o°ÝÃD¡C

TOP

½Ð±Ð°ÊºA¹Ïªí½d³ò---->Àx¦s®æªº­ÈÀHµÛ®É¶¡Åܰʪº°ÝÃD



³o­Ó値ªºÅܰʬO­n¥ÎÀ³¨ì°ÊºA¹Ïªí¤¤
Åý¹ÏªíÀHµÛ®É¶¡§â³Ì·sªº¹ÏªíÅã¥Ü¥X¨Ó

§Úªº·Qªk¬O¥i¥H§â¥L¼g¦bworkshee calculate¤¤
ÅýÀɮפ@¶}±Ò´N¶i¤J­pºâ
·íµM¹Ïªíªº¼Æ¾Ú¬O¥Îdde¦ê³s¶i¤Jexcel¤¤

TOP

¦^´_ 3# c_c_lai


·PÁ¦^À³!!§Ú¤F¸Ñ¤F!!
¦­¤W§Ú¤]´ú¸Õ¤F¤@¤U!!¥¿±`ªº³¡¥÷¬O¨S°ÝÃDªº!

³Ñ¤Uªº°ÝÃD§Ú¥t¥~µo°Ý¤F
¤]½Ð¥ý¶i¤£§[«ü¾É!!·PÁÂ

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-10-2 10:37 ½s¿è

¦^´_ 3# c_c_lai

DDE ªº«ü©w¿é¤JÄæ¦ì¸ê®Æ¶×¤J«á­Èªº²§°Ê,Worksheet_Calculate ¬O·|³QIJ°Êªº

¦^´_ 4# laieven
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Private Sub Worksheet_Calculate()
  3.     Dim NowDateTime, nowTime, startTime, stopTime, t As Integer
  4.     Dim tr As String
  5.     'Application.ScreenUpdating = False
  6.     NowDateTime = Now '²{¦bªº®É¶¡­È, ¥h±¼¾ã¼Æ³¡¥÷,
  7.     nowTime = (NowDateTime - Int(NowDateTime)) '±o¨ì²{¦bªº®É¶¡­È
  8.     startTime = Range("A2") '¶}½L®É¶¡, ¨Ò¦p: "09:00:00 AM"
  9.     stopTime = Range("A3")  '¦¬½L®É¶¡, ¨Ò¦p: "01:30:00 PM"
  10.     If nowTime <= startTime Then '©|¥¼¶}½L
  11.                 Exit Sub
  12.     ElseIf nowTime > stopTime Then '¤w¸g¦¬½L
  13.                 Exit Sub
  14.     ElseIf Range("B2") <> "-" And Range("B2") <> "###" Then '²M½Lªºª¬ºA, ¤£¨ú¨ä¸ê®Æ
  15.            '     xy = Int((nowTime - startTime) * 1440) + 1   '¨C®t 300 ¬í´N´«¤@¦C
  16.            '     Range("g1").Value = xy
  17.            '     Range("g2").Value = xy + 59

  18.         t = Application.Text(Time - [A6], "[M]") + 1  '­pºâ¶¡®æªº¤ÀÄÁ
  19.         Range("B5").Offset(t).Resize(, 4) = Range("B2:E2").Value
  20. End If
  21. 'Application.ScreenUpdating = True
  22. Application.StatusBar = Time
  23. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤H¥Í³Ì¤jªº¦¨´N¬O±q¥¢±Ñ¤¤¯¸°_¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD