- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 15
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-12
|
¥»©«³Ì«á¥Ñ 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§@ªí¤º)- Private Sub mvDate_DateClick(ByVal DateClicked As Date)
- rTar = DateClicked ' ³]©w¤é´Á¨ì ¥Ø«eÀx¦s®æ
- mvDate.Visible = False ' ÁôÂäé¾äªí
- cbClrDate.Visible = False ' ÁôÂòM°£¤é´Á¶s
- End Sub
- Private Sub cbClrDate_Click()
- rTar = "" ' ²MªÅ ¥Ø«eÀx¦s®æ
- mvDate.Visible = False
- cbClrDate.Visible = False
- End Sub
- Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
- With Target
- If .Row = 1 And .Column = 1 Then ' ¹ï [A1} Àx¦s®æ«ö·Æ¹«¥kÁä
- mvOpenDate.Visible = True ' Åã¥Ü¤é¾äªí
- cbClearDate.Visible = True ' Åã¥Ü²M°£¤é´Á¶s
- Cancel = True ' ¤£Ä~Äò°õ¦æì¥ý«ö·Æ¹«¥kÁä·|°õ¦æªº¥\¯à
- Exit Sub
- End If
- End With
- End Sub
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Set rTar = Target ' ³]©w rTar ¬° ¥Ø«eÀx¦s®æ
- End Sub
½Æ»s¥N½X ¥H¤Uµ{¦¡½X©ñ¦b ThisWorkBook :- Private Sub Workbook_Open()
- With Sheets("¤u§@ªí1")
- rTar = ""
- With .mvDate
- .Visible = True ' Åã¥Ü¤é¾äªí
- .Value = Date ' ³]©w¹w³]Ȭ°¤µ¤Ñ
- .Visible = False ' ÁôÂäé¾äªí
- End With
- .cbClrDate.Visible = False ' ÁôÂòM°£¤é´Á¶s
- End With
- End Sub
½Æ»s¥N½X ¥H¤Uµ{¦¡½X©ñ¦b Module :- Public rTar As Range
- Option Explicit
½Æ»s¥N½X |
|