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

[µo°Ý] ¯à§_À°§Ú¬Ý¬Ý¦p¦ó±N¦¹µ{¦¡§ó§ï¦¨¥H ¤p®É ¤ÀÄÁ ¬í¼Æ ­pºâ(¤w¸Ñ¨M)

[µo°Ý] ¯à§_À°§Ú¬Ý¬Ý¦p¦ó±N¦¹µ{¦¡§ó§ï¦¨¥H ¤p®É ¤ÀÄÁ ¬í¼Æ ­pºâ(¤w¸Ñ¨M)

¥»©«³Ì«á¥Ñ vpower ©ó 2011-5-24 09:23 ½s¿è

ÂI¿ï¤U¤è¤U¸üÀɮשÎÆ[¬Ý¤U¤èªº¸Ñ»¡:
http://naturefruit.myweb.hinet.net/Day.xls

A      B     C     D
1
2 ¬ù·|            2011/5/11
3 ¦Y¶º            2001/5/10
4
  1. For J1 = 2 To Sheets("Sheet1").[C65536].End(xlUp).Row
  2. I1 = DateDiff("D", Date, Range("C" & J1))
  3. If I1 < 0 Then S1 = "¤w¸g¶W¹L¤F" & " " & (-1) * (I1) & " ¤Ñ"
  4. If S1 <> "" Then S2 = S2 & "¶ZÂ÷" & " " & Sheets("Sheet1").Range("A" & J1) & " ªº®É¶¡" & S1 & vbNewLine
  5. S1 = "": I1 = 0
  6. Next
  7. If S2 <> "" Then MsgBox S2
  8. S2 = ""
½Æ»s¥N½X
¥H¤W¬°¤@­Ó¥H ¤Ñ ­pºâªºµ{¦¡¡A¥H¤Wµ{¦¡°õ¦æ«á¡A·|¸õ¥X¤@­Óµøµ¡¡AÅã¥Ü¦p¤U

¶ZÂ÷ ¬ù·| ªº®É¶¡¤w¸g¶W¹L 1 ¤Ñ
¶ZÂ÷ ¦Y¶º ªº®É¶¡¤w¸g¶W¹L 6 ¤Ñ


§Ú§Æ±æ¯à§ó§ï¦¨¥H ¤p®É ¤ÀÄÁ ¬í¼Æ ­pºâ

©Ò¥H§Ú·|¥ýDÄæÀx¦s®æªºÄݩʧó§ï¦¨¦Û­q mm/dd hh:mm:ss

µM«á¿é¤J®É¶¡,Åã¥Ü¦p¤U:

¶ZÂ÷ ¬ù·| ªº®É¶¡¤w¸g¶W¹L 1 ¤p®É
¶ZÂ÷ ¦Y¶º ªº®É¶¡¤w¸g¶W¹L 6 ¤p®É

©Î

¶ZÂ÷ ¬ù·| ªº®É¶¡¤w¸g¶W¹L 1 ¤ÀÄÁ
¶ZÂ÷ ¦Y¶º ªº®É¶¡¤w¸g¶W¹L 6 ¤ÀÄÁ

©Î

§â"¤w¸g¶W¹L"Åܦ¨"ÁÙ¦³"

¥H¤W¤T­Ó°ÝÃD¡AÁÂÁ¦U¦ì¤j¤j¤F!

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-5-13 11:22 ½s¿è

¦^´_ 1# vpower
  1. Private Sub CommandButton1_Click()
  2.     Dim TheDay#, Msg$, J1%, S$, D$, H$
  3.     For J1 = 2 To Sheets("Sheet1").[C65536].End(xlUp).Row
  4.         TheDay = Now - Range("C" & J1).Value: Msg = " ®É¶¡ ¤w¹L"
  5.         If Range("C" & J1) >= Now Then TheDay = Range("C" & J1) - Now: Msg = " ®É¶¡ ÁÙ¦³"
  6.         H = IIf(Abs(Int(TheDay)) > 0, Abs(Int(TheDay)) & "¤Ñ", "") & Format(TheDay, "hh¤p®É:mm¤ÀÄÁ:ss¬í")
  7.         H = Replace(Replace(H, "00¤p®É:", ""), "00¤ÀÄÁ:", "")
  8.         S = IIf(S = "", "", S & vbNewLine) & "¶ZÂ÷ " & Sheets("Sheet1").Range("A" & J1) & Msg & H
  9.     Next
  10.     If S <> "" Then MsgBox S, , Format(Now, "dddddd ttttt")
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE


    ³o¦ì¤j¤j¯uªº¬O¤S§Ö¤S¦n..«D±`·PÁÂ..

¥i§_¦A½Ð±Ð¤@­Ó°ÝÃD?
D¬O°µ¤°»ò¥Îªº©O?
¬O§_¥i¥H§R°£©O?

ÁÙ¦³µo²{¤@­Ó¤pBUG,
A1=¬ù·| C1=®É¶¡
A2=¦Y¶º C2=ªÅ­È
A3=½m²ß C3=®É¶¡

·í¦³ªÅ­Èªº®É­Ô,¨t²Î¨ÌµM·|Åã¥Ü,¦Ó¥B·|¥X²{¤w¶W¹L4¸U¦h¤ÑªºBUG,§Ú¸Ó¦p¦óÅý¥¦¤£Åã¥Ü©O?
--------------------------------------------------------------------------------------------------------------------------------
¦pªG§Ú­n¼W¥[¤@­Ó§PÂ_,Åý¥L¦bÁÙ¦³5¤ÀÄÁªº®É­Ô´£¿ô,¦Ó¥B¦b¶}±ÒMSGµøµ¡®É¥i¥H¥X²{¤@¤p¬q­µ®Ä,¤£ª¾¹D¬O§_¦³¿ìªk©O?

TOP

¦^´_ 3# vpower
¨º¬O¦h¾lªº,¥i§R±¼.
  1. Private Sub CommandButton1_Click()
  2.     Dim TheDay#, Msg$, J1%, S$, H$
  3.     For J1 = 2 To Sheets("Sheet1").[C65536].End(xlUp).Row
  4.         If Range("C" & J1) <> "" And IsDate(Range("C" & J1)) Then
  5.             TheDay = Now - Range("C" & J1).Value: Msg = " ®É¶¡ ¤w¹L"
  6.             If Range("C" & J1) >= Now Then TheDay = Range("C" & J1) - Now: Msg = " ®É¶¡ ÁÙ¦³"
  7.             H = IIf(Abs(Int(TheDay)) > 0, Abs(Int(TheDay)) & "¤Ñ", "") & Format(TheDay, "hh¤p®É:mm¤ÀÄÁ:ss¬í")
  8.             H = Replace(Replace(Replace(H, "00¤p®É:", ""), "00¤ÀÄÁ:", ""), ":00¬í", "")
  9.             S = IIf(S = "", "", S & vbNewLine) & "¶ZÂ÷ " & Sheets("Sheet1").Range("A" & J1) & Msg & H
  10.         End If
  11.     Next
  12.     If S <> "" Then MsgBox S, , Format(Now, "dddddd ttttt")
  13. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# GBKEE

     ¯u¬O¸U¤À·PÁÂ,§Ú¬Ý¤F¤@¤U¥Î­ì¨Ó¨º­Ó¤Ñ¼ÆªºÁÙ¬O¤£·|­×§ï¨º­ÓBUG,¦A³Â·Ð±z¤@¤U,·P®¦!
°ÝÃD¤@:
  1. For J1 = 2 To Sheets("Sheet1").[C65536].End(xlUp).Row
  2. I1 = DateDiff("D", Date, Range("C" J1))
  3. If I1 < 0 Then S1 = "¤w¸g¶W¹L¤F" " " & (-1) * (I1) & " ¤Ñ"
  4. If S1 <> "" Then S2 = S2 "¶ZÂ÷" & " " & Sheets("Sheet1").Range("A" & J1) & " ªº®É¶¡" & S1 & vbNewLine
  5. S1 = "": I1 = 0
  6. Next
  7. If S2 <> "" Then MsgBox S2
  8. S2 = ""
½Æ»s¥N½X
------------------------------------------------------------------------------------------------------------------

°ÝÃD¤G:
µM«á¦pªG¬O³o­Ó ¤p®É ¤ÀÄÁ ¬í¼Æªº
·s¼W¤@­ÓIF§PÂ_, µM«á§Ú·s¼W¤@­ÓTextBox,¨Ì·Ó§Ú¶ñ¤Jªº¼Æ­ÈX, Åý®É¶¡¨ì«eX¤ÀÄÁ´£¿ô
¶ñ¤JªºX©M®É¶¡¨ì«eX¤ÀÄÁªºX¬O¦P¤@­Ó.

TOP

¦^´_ 5# vpower
  1. Private Sub Workbook_Open()
  2.     For J1 = 2 To Sheets("Sheet1").[C65536].End(xlUp).Row
  3.         If Range("C" & J1) <> "" And IsDate(Range("C" & J1)) Then
  4.         ''''''''''''''''''''''''''''''''''''''''''''''''
  5.             I1 = DateDiff("D", Date, Range("C" & J1))
  6.             If I1 < 0 Then S1 = "ªº®É¶¡¤w¸g¨ì¤F" & (-1) * (I1) & "¤Ñ"
  7.             If S1 <> "" Then S2 = S2 & Sheets("Sheet1").Range("A" & J1) & S1 & vbNewLine
  8.             S1 = "": I1 = 0
  9.         '''''''''''''''''''''''''''''''''''''''''''
  10.         End If
  11.     Next
  12.     If S2 <> "" Then MsgBox S2
  13.     S2 = ""
  14. End Sub
½Æ»s¥N½X
  1. Sub ´£¿ô()
  2.     Dim TheTime, TheTimeMsg$, Msg As Boolean
  3.     With Sheets("Sheet1")
  4.         For J1 = 2 To .[C65536].End(xlUp).Row
  5.             If Range("C" & J1) <> "" And IsDate(Range("C" & J1)) Then If Range("C" & J1) > Now Then Msg = True
  6.         Next
  7.         If Msg = False Then MsgBox "©Ò¦³¨Æ¥ó¬Ò¤w¹L®É!!", , "´£¿ô": Exit Sub
  8.         Do
  9.             TheTime = Application.InputBox("¿é¤J´£¿ô¤ÀÄÁ", "´£¿ô", , Msg)
  10.             If TheTime = "" Then Exit Sub
  11.             TheTimeMsg = TheTime
  12.         Loop Until TheTime >= 1 And TheTime <= 60
  13.         For J1 = 2 To .[C65536].End(xlUp).Row
  14.             If Range("C" & J1) <> "" And IsDate(Range("C" & J1)) Then
  15.                 If Range("C" & J1) - TimeValue("00:" & TheTime) > Now Then
  16.                 Msg = True
  17.                '¤G¿ï¤@
  18.                 Application.OnTime Range("C" & J1) - TimeValue("00:" & TheTime), "Sheet1.CommandButton1_Click"
  19.                 'Sheet1.CommandButton1_Click  µ{¦¡½X©ñ¦b Sheet1
  20.                  
  21.                 'Application.OnTime Range("C" & J1) - TimeValue("00:" & TheTime), "ThisWorkbook.Workbook_Open"
  22.                 'ThisWorkbook.Workbook_Open µ{¦¡½X©ñ¦b ThisWorkbook               
  23.                 End If
  24.             End If
  25.         Next
  26.     End With
  27. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ vpower ©ó 2011-5-14 16:43 ½s¿è

GBKEEª©¥D¤j¤j..¿n·¥¤S¨³³tªº¬°§Ú¸Ñ¨M¤F§ÚªºÃøÃD..¯uªº¬O¤Ó·PÁ¤F!!

§Ú¦³­ÓºÃ°Ý,Ãö©ó¥H¤Uªº³]©w,¬O§_¯à°÷©M¥ý«e¨º­Ó¤@¼Ë,§iª¾§Ú¶ZÂ÷AÄæ®É¶¡ÁٳѤU?¤ÀÄÁ©O? (¦b¸õ¥XMSG´£¿ôµøµ¡¥H«e¬O§_¥i¥H¦Û°Ê¶}±ÒC©ÎD¼Ñªº«ü©wÀɮשO?³o¼Ë´N¥i¥H¦³Án­µ´£¿ôªº®ÄªG¤F,¨S¦³¿ìªk¤]¨SÃö«Y,·PÁ±z)
  1. Sub ´£¿ô()
  2.     Dim TheTime, TheTimeMsg$, Msg As Boolean
  3.     With Sheets("Sheet1")
  4.         For J1 = 2 To .[C65536].End(xlUp).Row
  5.             If Range("C" & J1) <> "" And IsDate(Range("C" & J1)) Then If Range("C" & J1) > Now Then Msg = True
  6.         Next
  7.         If Msg = False Then MsgBox "©Ò¦³¨Æ¥ó¬Ò¤w¹L®É!!", , "´£¿ô": Exit Sub
  8.         Do
  9.             TheTime = Application.InputBox("¿é¤J´£¿ô¤ÀÄÁ", "´£¿ô", , Msg)
  10.             If TheTime = "" Then Exit Sub
  11.             TheTimeMsg = TheTime
  12.         Loop Until TheTime >= 1 And TheTime <= 60
  13.         For J1 = 2 To .[C65536].End(xlUp).Row
  14.             If Range("C" & J1) <> "" And IsDate(Range("C" & J1)) Then
  15.                 If Range("C" & J1) - TimeValue("00:" & TheTime) > Now Then
  16.                 Msg = True
  17.                '¤G¿ï¤@
  18.                 Application.OnTime Range("C" & J1) - TimeValue("00:" & TheTime), "Sheet1.CommandButton1_Click"
  19.                 'Sheet1.CommandButton1_Click  µ{¦¡½X©ñ¦b Sheet1
  20.                  
  21.                 'Application.OnTime Range("C" & J1) - TimeValue("00:" & TheTime), "ThisWorkbook.Workbook_Open"
  22.                 'ThisWorkbook.Workbook_Open µ{¦¡½X©ñ¦b ThisWorkbook               
  23.                 End If
  24.             End If
  25.         Next
  26.     End With
  27. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ vpower ©ó 2011-5-14 21:49 ½s¿è

¦^´_ 6# GBKEE


DÄæ§Ú¨S¥Î¨ì,DateDiff("D", Date, Range("C" & J1)),ªºD¦p¦ó²¾°£©O?
¬O³o¦æ I1 = DateDiff("D", Date, Range("C" & J1))ª½±µ²¾°£¶Ü?

------------------------------------------------------------------------
  1. Private Sub Workbook_Open()
  2.     For J1 = 2 To Sheets("Sheet1").[C65536].End(xlUp).Row
  3.         If Range("C" & J1) <> "" And IsDate(Range("C" & J1)) Then
  4.         ''''''''''''''''''''''''''''''''''''''''''''''''
  5.             I1 = DateDiff("D", Date, Range("C" & J1))
  6.             If I1 < 0 Then S1 = "ªº®É¶¡¤w¸g¨ì¤F" & (-1) * (I1) & "¤Ñ"
  7.             If S1 <> "" Then S2 = S2 & Sheets("Sheet1").Range("A" & J1) & S1 & vbNewLine
  8.             S1 = "": I1 = 0
  9.         '''''''''''''''''''''''''''''''''''''''''''
  10.         End If
  11.     Next
  12.     If S2 <> "" Then MsgBox S2
  13.     S2 = ""
  14. End Sub
½Æ»s¥N½X

TOP

¦^´_ 8# vpower

    ´ú¸Õ.rar (28.62 KB)

¸Õ¸Õ¬Ý¬Ý ¶}Àɫᦳ¿ù»~®É½Ð­×§ï ¤U¦Cµ{¦¡ªº ¼½©ñ­µ¼ÖÀÉ®×
  1. Private Sub Workbook_Open()
  2.        '
  3.        '
  4.     With Sheet1.WindowsMediaPlayer1     '¥[¤JMediaPlayer¼½©ñ­µ¼Ö
  5.        .URL = "d:\·Rªº¸ô¤W§Ú©M§A.mp3"  '½Ð­×§ï­µ¼ÖÀÉ®×
  6.         .Visible = False
  7.         .Controls.Stop
  8.     End With
  9.     ¨Æ¥ó´£¿ô          '¦Û°Ê©ó®É¶¡¨ì´£¿ô
  10.     If S2 <> "" Then MsgBox S2
  11. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ vpower ©ó 2011-5-15 01:21 ½s¿è

¦^´_ 9# GBKEE


§ä¤£¨ì¤èªk©Î¸ê®Æ¦¨­û,§Ú·Q¬O¤£¬O­n¥h¤U¸üÃö©ó¼W¯q¶°¬ÛÃöªºªF¦è.
Åã¥Üªº¦r¦ê -->     .WindowsMediaPlayer1
  1. With Sheet1.WindowsMediaPlayer1     '¥[¤JMediaPlayer¼½©ñ­µ¼Ö
  2.        .URL = "D:\¼Æ¦Ïºq.MP3"  '½Ð­×§ï­µ¼ÖÀÉ®×
  3.         .Visible = False
  4.         .Controls.Stop
  5.     End With
  6.         For J1 = 2 To Sheets("Sheet1").[C65536].End(xlUp).Row
  7.         If Range("C" & J1) <> "" And IsDate(Range("C" & J1)) Then
  8.         ''''''''''''''''''''''''''''''''''''''''''''''''
  9.             I1 = DateDiff("D", Date, Range("C" & J1))
  10.             If I1 >= 0 And I1 <= 90 Then S1 = "¦b90¤Ñ¤º¹L´Á"
  11.             If I1 <= 60 Then S1 = "¦b60¤Ñ¤º¹L´Á"
  12.             If I1 <= 30 Then S1 = "¦b30¤Ñ¤º¹L´Á"
  13.             If I1 < 0 Then S1 = "¤w¹L´Á" & (-1) * (I1) & "¤Ñ"
  14.             If S1 <> "" Then S2 = S2 & Sheets("Sheet1").Range("A" & J1) & "-" & S1 & vbNewLine & vbNewLine
  15.             S1 = "": I1 = 0
  16.         '''''''''''''''''''''''''''''''''''''''''''
  17.         End If
  18.     Next
  19.     If S2 <> "" Then MsgBox S2
½Æ»s¥N½X
§Ú¦Û¤v°µ¤F¤@ÂI¥\½Ò,°õ¦æ«á,¦³¥X²{´£¿ôµøµ¡,¦ý¬O¨S¦³­µ¼Ö
´¡¤JWindows Media Playerªº°µªk¦p¤U:
1. ¦b [À˵ø] ¥\¯àªí¤W¡A«ü¦V [¤u¨ã¦C]¡AµM«á«ö¤@¤U [±±¨î¤u¨ã½c]¡C
2. ¦b [±±¨î¤u¨ã½c] ¤¤¡A¿ï[¨ä¥L±±¨î¶µ] «ö¶s¡C
3. ¦b±±¨î¶µ²M³æ¤¤¡A¿ï[Windows Media Player]¡C
4. ¥Î·Æ¹«´å¼Ð©Ô¥X¤@­Ó¤è¶ô¥H«Ø¥ß Windows Media Player ±±¨î¶µ¡C
5. ¦b [±±¨î¤u¨ã½c] ¤¤¡A«ö¤@¤U [ÄÝ©Ê] «ö¶s¡C
6. ¦b [ÄÝ©Ê] µøµ¡ªº [FileName] ¤è¶ô¤¤¡A¿é¤J±z·Q­n¼½©ñªºÀɮ׸ô®|»P¦WºÙ¡AµM«á«ö ENTER¡C

TOP

        ÀR«ä¦Û¦b : ­n¤ñ½Ö§ó¨ü½Ö¡D¤£­n¤ñ½Ö§ó©È½Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD