§Q¥ÎVBA±N·j´M¤º®eÅã¥Ü¥X¨Ó(¼Æµ§¸ê®Æ)
- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¥»©«³Ì«á¥Ñ yen956 ©ó 2017-4-17 14:36 ½s¿è
¦^´_ 2# bioleon69
¸Õ¸Õ¬Ý:- '·j´M
- Private Sub CommandButton1_Click()
- Dim eR As Long, Dt As Date, Dt1 As Date, Dt2 As Date, St As String, Rng As Range, E
- If [E2] = "" And [E4] = "" Then Exit Sub
- [G2].Resize(Rows.Count - 1, 3) = ""
- eR = [A65536].End(xlUp).Row
- Set Rng = [A2].Resize(eR - 1, 1)
- If [E2] <> "" Then
- Dt1 = [E2] & "/1"
- Dt2 = Year(Dt1) & "/" & Month(Dt1) + 1 & "/1"
- End If
- For Each E In Rng
- Dt = E: St = E.Offset(, 1)
- If [E2] = "" Then
- If St = [E4] Then
- eR = [G65536].End(xlUp).Row + 1
- E.Resize(1, 3).Copy Cells(eR, 7)
- End If
- ElseIf [E4] = "" Then
- If Dt >= Dt1 And Dt < Dt2 Then
- eR = [G65536].End(xlUp).Row + 1
- E.Resize(1, 3).Copy Cells(eR, 7)
- End If
- Else
- If Dt >= Dt1 And Dt < Dt2 And St = [E4] Then
- eR = [G65536].End(xlUp).Row + 1
- E.Resize(1, 3).Copy Cells(eR, 7)
- End If
- End If
- Next
- End Sub
- '²M°£
- Private Sub CommandButton2_Click()
- [G2].Resize(Rows.Count - 1, 3) = ""
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|