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

¤é´Á¿ï¶µ¦P¤@¶g

¤é´Á¿ï¶µ¦P¤@¶g

¦U¦U°ª¤â¤j¤j,

  ¦pªþ¥ó,
1.ÂI¬õ¦â³oÄæ®É¥X²{¤é´Á¿ï¾Ü¹ï¸Ü®Ø¨Ñ¿ï¾Ü,¦p¤é´Á¤£¬O
¬P´Á¤»®É,¥X²{¹ï¸Ü®Ø§iª¾¡C
2.ÂI¶À¦âªº¥ô¤@Àx¦s®æ®É,¤@¼Ë¥X²{¤é´Á¿ï¾Ü¥\¯à,¦ý¦pªG¤£¬O
¿ï¾Ü©M¬õ¦â¤é´Á¦P¤@¶g®É,¥X²{¹ï¸Ü®Ø§iª¾
¥H¤W
Àµ½Ð¤j¤j¨ó§U

TEST.rar (15.79 KB)

¦^´_ 1# zamamilo
  1. Private Sub Calendar1_Click()
  2. If ActiveCell.Address = "$I$5" Then
  3.   If Weekday(Calendar1.Value, 2) <> 6 Then MsgBox "¤é´Á«D¬P´Á¤»"
  4.   [I5] = Calendar1
  5.   Calendar1.Visible = False
  6.   ElseIf Not Intersect(ActiveCell, [B76:B81]) Is Nothing Then
  7.   If IsDate([I5]) Then
  8.   s = [I5] - Weekday([I5], 2)
  9.   If Calendar1 < s Or Calendar1 > s + 6 Then _
  10.   MsgBox "¤é´Á¥¼¦b¤@¬P´Á¤§¤¤" Else _
  11.   ActiveCell = Calendar1: Calendar1.Visible = False
  12.   Else
  13.    Exit Sub
  14.   End If
  15. End If
  16. End Sub

  17. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  18. If Intersect(Target, Union([I5], [B76:B81])) Is Nothing Then Calendar1.Visible = False: Exit Sub
  19. With Calendar1
  20. .Top = Target.Top
  21. .Left = Target.Offset(, 1).Left
  22. .Visible = True
  23. End With
  24. End Sub
½Æ»s¥N½X
¤é´Á.zip (22.19 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : §g¤l¥ß«í§Ó¡A¤p¤H«í¥ß§Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD