- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 243
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-10
|
¦^´_ 3# toxin
À³¸Ó¬O§A¨âÓÀɮפÀ§O¨Ï¥Î2ÓExcelÀ³¥Îµ{¦¡¶}±Ò©ÒP
§Ú·Q§A³oÓµ{§ÇÀ³¸Ó¬O¦b§t¦³Sheets("»s³y³æ")ªº¬¡¶Ã¯¤¤¬Y¤@¤u§@ªíªº«ö¶sµ{§Ç
¸Õ¸Õ¥H¤Uµ{¦¡½X- Private Sub CommandButton1_Click()
- Dim a As Integer, i As Integer
- Dim b As Integer
- Dim c As Variant
- Dim d As Variant
- Dim E As Variant
- Dim WB As Workbook, IA As Integer, IB As Integer, IC As Integer
- IA = 7000
- IB = 3
- IC = 10
- Set WB = Workbooks.Open("d:\test.xls") '¶}±Ò¬¡¶Ã¯: «È¤á¤u§@ªí©Ò¦bªº¬¡¶Ã¯
- Do
- If WB.Sheets("»s³y³æ").Range("E" & IB) <> "" Then
- IB = IB + 1
- End If
- Loop While Sheets("»s³y³æ").Range("E" & IB) <> ""
- AGO:
- IC = IC + 1
- Do
- d = Sheets("»s³y³æ").Range("D" & IB)
- Set c = WB.Sheets("«È¤á").Range("B11:B" & IC).Find(What:=d, LookIn:=xlFormulas, _
- LookAt:=1, SearchOrder:=2, SearchDirection:=xlNext, _
- MatchCase:=False, MatchByte:=False, SearchFormat:=True)
- If IC = IA Then
- Sheets("»s³y³æ").Range("E" & IB) = "¥¼©R¦W"
- GoTo STAR
- End If
- If c Is Nothing Then
- GoTo AGO
- Else
- ' IA = IC - 1
- Sheets("»s³y³æ").Range("E" & IB) = WB.Sheets("«È¤á").Range("H" & IC)
- End If
- STAR:
- IB = IB + 1
- IC = 11
- Loop While Sheets("»s³y³æ").Range("D" & IB) <> ""
- WB.Close
- End Sub
½Æ»s¥N½X |
|