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

[µo°Ý] ¤é¾ä±±¨î¶µ¦p¦ó³]¸m¦¨¡A¦b[¥Ø«eÀx¦s®æ]¼g¤J«ü©w¤é¾äªº¤é´Á?

[µo°Ý] ¤é¾ä±±¨î¶µ¦p¦ó³]¸m¦¨¡A¦b[¥Ø«eÀx¦s®æ]¼g¤J«ü©w¤é¾äªº¤é´Á?

·Q½Ð°Ý¦U¦ì«e½ú
¤é¾ä±±¨î¶µ¦p¦ó±N¥Ø«eÀx¦s®æ¼g¤J¡A¿ï¨ú¤é¾ä«áªº¤é´Á?

¥Ø«e³s«ü©wÀx¦s®æ¼g¤J¤é´Á³£¼g¤£¥X¨Ó...

¥»©«³Ì«á¥Ñ luhpro ©ó 2014-8-28 23:18 ½s¿è
·Q½Ð°Ý¦U¦ì«e½ú
¤é¾ä±±¨î¶µ¦p¦ó±N¥Ø«eÀx¦s®æ¼g¤J¡A¿ï¨ú¤é¾ä«áªº¤é´Á?
¥Ø«e³s«ü©wÀx¦s®æ¼g¤J¤é´Á³£¼g¤£¥X ...
jackson7015 µoªí©ó 2014-8-28 17:00

§Ú®³§Ú¥H«e¼g¦nªºµ{¦¡½X¨Ó§ï:
¤ë¾ä±±¨î¶µ : mvDate
²M°£¤é´Á«ö¶s   : cbClrDate

°õ¦æ¤è¦¡:
1. ¹ï [A1] Àx¦s®æ«ö·Æ¹«¥kÁä, ±Ò°Ê ¤ë¾ä±±¨î¶µ »P ²M°£¤é´Á«ö¶s.
    2-1. ­Y¦¹®ÉÂIÀ» ²M°£¤é´Á«ö¶s ·|²MªÅ ¥Ø«eÀx¦s®æ, µM«áÁôÂà ±±¨î¶µ »P «ö¶s.
    2-2. ­Y¦¹®É¦b ¤ë¾ä±±¨î¶µ ÂIÀ»¥ô¤@¤é´Á, ·|±N¸Ó¤é´Á³]©w¨ì ¥Ø«eÀx¦s®æ, µM«áÁôÂà ±±¨î¶µ »P «ö¶s.

¥H¤Uµ{¦¡½X©ñ¦b Sheets("¤u§@ªí1") (¤ë¾ä±±¨î¶µ »P ²M°£¤é´Á«ö¶s ³£©ñ¦b¦¹¤u§@ªí¤º)
  1. Private Sub mvDate_DateClick(ByVal DateClicked As Date)
  2.   rTar = DateClicked ' ³]©w¤é´Á¨ì ¥Ø«eÀx¦s®æ
  3.   mvDate.Visible = False ' ÁôÂäé¾äªí
  4.   cbClrDate.Visible = False ' ÁôÂòM°£¤é´Á¶s
  5. End Sub

  6. Private Sub cbClrDate_Click()
  7.   rTar = "" ' ²MªÅ ¥Ø«eÀx¦s®æ
  8.   mvDate.Visible = False
  9.   cbClrDate.Visible = False
  10. End Sub

  11. Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
  12.   With Target
  13.     If .Row = 1 And .Column = 1 Then ' ¹ï [A1} Àx¦s®æ«ö·Æ¹«¥kÁä
  14.       mvOpenDate.Visible = True ' Åã¥Ü¤é¾äªí
  15.       cbClearDate.Visible = True ' Åã¥Ü²M°£¤é´Á¶s
  16.       Cancel = True ' ¤£Ä~Äò°õ¦æ­ì¥ý«ö·Æ¹«¥kÁä·|°õ¦æªº¥\¯à
  17.       Exit Sub
  18.     End If
  19.   End With
  20. End Sub

  21. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  22.     Set rTar = Target ' ³]©w rTar ¬° ¥Ø«eÀx¦s®æ
  23. End Sub
½Æ»s¥N½X
¥H¤Uµ{¦¡½X©ñ¦b ThisWorkBook :
  1. Private Sub Workbook_Open()
  2.   With Sheets("¤u§@ªí1")
  3.     rTar = ""
  4.     With .mvDate
  5.       .Visible = True ' Åã¥Ü¤é¾äªí
  6.       .Value = Date ' ³]©w¹w³]­È¬°¤µ¤Ñ
  7.       .Visible = False ' ÁôÂäé¾äªí
  8.     End With
  9.     .cbClrDate.Visible = False ' ÁôÂòM°£¤é´Á¶s
  10.   End With
  11. End Sub
½Æ»s¥N½X
¥H¤Uµ{¦¡½X©ñ¦b Module :
  1. Public rTar As Range
  2. Option Explicit
½Æ»s¥N½X

TOP

¦^´_ 2# luhpro
·PÁÂluhpro¤j¤jªºÀ°¦£

¦]¬°¦Û¤v¹q¸£²×¨S¦³Access¡A©Ò¥H§Úªº¤ë¾ä±±¨î¶µ¥Ø¬O¥t¥~¸ü¤Jªº¡A¨Ó·½«h¬O¥Ñ2007¤¤¨ú¥Xªº
«Å§i¼Ò²Õ¬ODTPicker1_CallbackKeyDown
©Ò¥H¤£¾å±o«ç»ò½s¼g

¦]¬°±±¨î¶µ¥Ø¤º¨S¦³¤ë¾ä±±¨î¶µ©M²M°£¤é´Á«ö¶s   
±a¤J¤j¤j´£¨Ñªº¤½¦¡¡A°õ¦æµ{§Ç¨S¦³¤ÏÀ³
¦Ó¨Ï¥Îºô¸ô¤W¨ä¥LÃþ¦üªº½s¼g¡A¤]¬O¦³¿ù»~

¤£¾å±o¬O§_¦³¨ä¥L«e³Æ¦³Ãþ¦ü¸gÅç

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2014-8-30 09:27 ½s¿è

¦^´_ 3# jackson7015
¸Õ¸Õ¬Ý:

cbClrDate : ²M°£¤é´Á«ö¶s
dtpDate : ¤é¾äªí

¥H¤Uµ{¦¡½X©ñ¦b ThisWorkBook :
  1. Private Sub Workbook_Open()
  2.   With Sheets("¤u§@ªí1")
  3.     Set rTar = [A2]
  4.     With .dtpDate
  5.       .Visible = True ' Åã¥Ü¤é¾äªí
  6.       .Value = Date ' ³]©w¹w³]­È¬°¤µ¤Ñ
  7.       .Visible = False ' ÁôÂäé¾äªí
  8.     End With
  9.     .cbClrDate.Visible = False ' ÁôÂòM°£¤é´Á¶s
  10.   End With
  11. End Sub
½Æ»s¥N½X
¥H¤Uµ{¦¡½X©ñ¦b Module :
  1. Public rTar As Range

  2. Option Explicit
½Æ»s¥N½X
¥H¤Uµ{¦¡½X©ñ¦b Sheets("¤u§@ªí1") (¤ë¾ä±±¨î¶µ »P ²M°£¤é´Á«ö¶s ³£©ñ¦b¦¹¤u§@ªí¤º) :
  1. Private Sub dtpDate_Change()
  2.   SetDate
  3. End Sub

  4. Private Sub dtpDate_CloseUp()
  5.   SetDate
  6. End Sub

  7. Private Sub cbClrDate_Click()
  8.   rTar = "" ' ²MªÅ ¥Ø«eÀx¦s®æ
  9.   dtpDate.Visible = False
  10.   cbClrDate.Visible = False
  11. End Sub

  12. Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
  13.   With Target
  14.     If .Row = 1 And .Column = 1 Then ' ¹ï [A1} Àx¦s®æ«ö·Æ¹«¥kÁä
  15.       dtpDate.Visible = True ' Åã¥Ü¤é¾äªí
  16.       cbClrDate.Visible = True ' Åã¥Ü²M°£¤é´Á¶s
  17.       Cancel = True ' ¤£Ä~Äò°õ¦æ­ì¥ý«ö·Æ¹«¥kÁä·|°õ¦æªº¥\¯à
  18.       Exit Sub
  19.     End If
  20.   End With
  21. End Sub

  22. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  23.   With Target
  24.    If .Row <> 1 And .Column <> 1 Then
  25.      Set rTar = Target ' ³]©w rTar ¬° ¥Ø«eÀx¦s®æ
  26.    End If
  27.   End With
  28. End Sub

  29. Private Sub SetDate()
  30.   With rTar
  31.     .Value = dtpDate ' ³]©w¤é´Á¨ì ¥Ø«eÀx¦s®æ
  32.     .NumberFormat = "yyyy/m/d;@"
  33.   End With
  34.   cbClrDate.Visible = False ' ÁôÂòM°£¤é´Á¶s
  35.   dtpDate.Visible = False ' ÁôÂäé¾äªí
  36. End Sub
½Æ»s¥N½X
ªþµù :  ¥H¤Wµ{¦¡¤£¯à¾A¥Î©ó A1 Àx¦s®æ

¥t¤W¤è  #2 µ{¦¡½X¦³»~ :
¦æ 16 »P 17 À³§ï¬°
  1. mvDate.Visible = True ' Åã¥Ü¤é¾äªí
  2. cbClrDate.Visible = True ' Åã¥Ü²M°£¤é´Á¶s
½Æ»s¥N½X

TOP

¦^´_ 4# luhpro


   ¤j¤j½Ð°Ý¦pªG¨Ï¥Î¢±¢¯¢°¢²­n¨Ï¥Î¤°»ò¶Ü¡H
¨Ï¥Î¦¹µ{¦¡½X¨S¦³¤ÏÀ³¡C¡C¡C¹ï¢é¢°¥kÁä¤]µL¤ÏÀ³¡C¡C¡C

TOP

¦^´_ 4# luhpro


    ¤w¸Ñ¨M...

TOP

        ÀR«ä¦Û¦b : Ä@­n¤j¡B§Ó­n°í¡B®ð­n¬X¡B¤ß­n²Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD