Private Sub CommandButton2_Click()
'3Ó¤ë
If TextBox2.Value = 1 Then A = Array(3, 5, 7, 15, 17, 19)
If TextBox2.Value = 2 Then A = Array(5, 7, 9, 17, 19, 21)
If TextBox2.Value = 3 Then A = Array(7, 9, 11, 19, 21, 23)
If TextBox2.Value = 4 Then A = Array(9, 11, 13, 21, 23, 25)
If TextBox2.Value = 5 Then A = Array(11, 13, 15, 23, 25)
If TextBox2.Value = 6 Then A = Array(13, 15, 17, 25)
If TextBox2.Value = 7 Then A = Array(15, 17, 19)
If TextBox2.Value = 8 Then A = Array(17, 19, 21)
If TextBox2.Value = 9 Then A = Array(19, 21, 23)
If TextBox2.Value = 10 Then A = Array(21, 23, 25)
If TextBox2.Value = 11 Then A = Array(23, 25)
If TextBox2.Value = 12 Then A = Array(25)
If TextBox2.Value = "" Then A = Array(3, 5, 7, 15, 17, 19)
If TextBox2.Value = 1 Then A = Array(3, 5, 7, 15, 17, 19)
If TextBox2.Value = 2 Then A = Array(5, 7, 9, 17, 19, 21)
If TextBox2.Value = 3 Then A = Array(7, 9, 11, 19, 21, 23)
If TextBox2.Value = 4 Then A = Array(9, 11, 13, 21, 23, 25)
If TextBox2.Value = 5 Then A = Array(11, 13, 15, 23, 25)
If TextBox2.Value = 6 Then A = Array(13, 15, 17, 25)
If TextBox2.Value = 7 Then A = Array(15, 17, 19)
If TextBox2.Value = 8 Then A = Array(17, 19, 21)
If TextBox2.Value = 9 Then A = Array(19, 21, 23)
If TextBox2.Value = 10 Then A = Array(21, 23, 25)
If TextBox2.Value = 11 Then A = Array(23, 25)
If TextBox2.Value = 12 Then A = Array(25)
If TextBox2.Value = "" Then A = Array(3, 5, 7, 15, 17, 19)
[attach]32173[/attach]§@ªÌ: °a¤ªºµ ®É¶¡: 2020-6-15 14:05
If TextBox2.Value = 1 Then A = Array(3, 5, 7, 15, 17, 19)
If TextBox2.Value = 2 Then A = Array(5, 7, 9, 17, 19, 21)
If TextBox2.Value = 3 Then A = Array(7, 9, 11, 19, 21, 23)
If TextBox2.Value = 4 Then A = Array(9, 11, 13, 21, 23, 25)
If TextBox2.Value = 5 Then A = Array(11, 13, 15, 23, 25)
If TextBox2.Value = 6 Then A = Array(13, 15, 17, 25)
If TextBox2.Value = 7 Then A = Array(15, 17, 19)
If TextBox2.Value = 8 Then A = Array(17, 19, 21)
If TextBox2.Value = 9 Then A = Array(19, 21, 23)
If TextBox2.Value = 10 Then A = Array(21, 23, 25)
If TextBox2.Value = 11 Then A = Array(23, 25)
If TextBox2.Value = 12 Then A = Array(25)
If TextBox2.Value = "" Then A = Array(3, 5, 7, 15, 17, 19)
k = TextBox2.Value: If k = "" Then k = 1
For i = k To 12: Idx = Idx + 1
If Idx < 4 Or Idx > 6 Then
itm = itm + 1: If itm = 7 Then Exit For
s = s & "," & i * 2 + 1
End If
Next i
A = Split(Mid(s, 2), ",")§@ªÌ: n7822123 ®É¶¡: 2020-6-17 02:16
¼gªk¤G¡G
k = TextBox2.Value: If k = "" Then k = 1
For i = k To 12
s = s & "," & i * 2 + 1
itm = itm + 1: If itm = 6 Then Exit For
If i = k + 2 Then i = i + 5
Next i
A = Split(Mid(s, 2), ",")
k = TextBox2.Value: If k = "" Then k = 1
For i = k To 12
s = s & "," & i * 2 + 1
itm = itm + 1: If itm = 6 Then Exit For
If i = k + 2 Then i = i + 3 '¸õ¹L«á3Ó°j°é
Next i
A = Split(Mid(s, 2), ",")§@ªÌ: °a¤ªºµ ®É¶¡: 2020-6-17 12:38
Sub ª±¤é´Á()
Dim Date1 As Date, Date2 As Date
CheckOK = False
Do Until CheckOK
On Error Resume Next
Date1 = InputBox("½Ð¿é¤J²Ä¤@¤Ñ¤W¯Z¤é´Á¡A" & vbCrLf & " »Ýn¤é´Á®æ¦¡ Ex¡G2020/1/1")
If Err <> 0 Then MsgBox "§A¿é¤Jªº¤£¬O¤é´Á®æ¦¡¡A½Ðקï" Else CheckOK = True
On Error GoTo 0
Loop
CheckOK = False
Do Until CheckOK
On Error Resume Next
Date2 = InputBox("½Ð¿é¤Jn¬d¸ßªº¤é´Á¡A" & vbCrLf & " »Ýn¤é´Á®æ¦¡ Ex¡G2020/7/1")
If Err <> 0 Then MsgBox "§A¿é¤Jªº¤£¬O¤é´Á®æ¦¡¡A½Ðקï" Else CheckOK = True
On Error GoTo 0
Loop
Date1 = Date1 - 1
If Date2 - Date1 < 0 Then MsgBox "§A¿é¤Jªº¬d¸ß¤é´Á¤ñ²Ä¤@¤Ñ¤W¯Z¤éÁÙ«e±": Exit Sub
'¥H°µ4¥ð2¬°¨Ò(6¤Ñ¤@´`Àô)
Select Case (Date2 - Date1) Mod 6
Case 1, 2, 3, 4: MsgBox "³o¤Ñn¤W¯Z"
Case 5, 6: MsgBox "®¥³ß!³o¤Ñ¬O¥ð°²^.^"
End Select
End Sub§@ªÌ: °a¤ªºµ ®É¶¡: 2020-6-23 17:37
Sub ª±¤é´Á()
Dim Date1 As Date, Date2 As Date
CheckOK = False
Do Until CheckOK
On Error Resume Next
Date1 = InputBox("½Ð¿é¤J²Ä¤@¤Ñ¤W¯Z¤é´Á¡A" & vbCrLf & " »Ýn¤é´Á®æ¦¡ Ex¡G2020/1/1")
If Err <> 0 Then MsgBox "§A¿é¤Jªº¤£¬O¤é´Á®æ¦¡¡A½Ðקï" Else CheckOK = True
On Error GoTo 0
Loop
CheckOK = False
Do Until CheckOK
On Error Resume Next
Date2 = InputBox("½Ð¿é¤Jn¬d¸ßªº¤é´Á¡A" & vbCrLf & " »Ýn¤é´Á®æ¦¡ Ex¡G2020/7/1")
If Err <> 0 Then MsgBox "§A¿é¤Jªº¤£¬O¤é´Á®æ¦¡¡A½Ðקï" Else CheckOK = True
On Error GoTo 0
Loop
Date1 = Date1 - 1
If Date2 - Date1 < 0 Then MsgBox "§A¿é¤Jªº¬d¸ß¤é´Á¤ñ²Ä¤@¤Ñ¤W¯Z¤éÁÙ«e±": Exit Sub
'¥H°µ4¥ð2¬°¨Ò(6¤Ñ¤@´`Àô)
Select Case Int(Date2 - Date1) Mod 6
Case 1, 2, 3, 4: MsgBox "³o¤Ñn¤W¯Z"
Case 5, 0: MsgBox "®¥³ß!³o¤Ñ¬O¥ð°²^.^"
End Select
End Sub §@ªÌ: °a¤ªºµ ®É¶¡: 2020-6-24 06:05
S = 3
E = 1
For F = 1 To 12 '«Ø¥ß½d³ò
For P = 1 To Day(DateSerial(Year(Now), F + 1, 0))
Cells(S, E) = DateSerial(Year(Now), F, P)
Cells(S - 1, E) = F & "¤ë" & P & "¤é" & WeekdayName(Weekday(P))
E = E + 1
If P = Day(DateSerial(Year(Now), F + 1, 0)) Then
If F = 12 Then Exit For
S = S + 2
E = 1
End If
Next P
Next F
Set AWN = ActiveWorkbook.Names '¦X¨Ö
For R = 1 To AWN.Count
If R <> 1 Then
K = Mid(AWN(R).RefersToR1C1Local, 2, Len(AWN(R))) & ","
Else
K = AWN(R).RefersToR1C1Local & ","
End If
u = u + K
Next R