- ©«¤l
- 5
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 11
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- OFFICE2003
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-11-25
- ³Ì«áµn¿ý
- 2016-12-21
|
¦^´_ 6# GBKEE
For S = 1 To Workbooks("MODELNUM.xls").Sheets.Count
Sheets(S).Activate
Range(Cells(1, 1), Cells(65536, 5).End(xlUp)).Select
Selection.Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
:=xlStroke, DataOption1:=xlSortNormal
Sheets(S).Range(Cells(1, 1), Cells(1, 5)).Select
CN = TBCHNM.Text
Set CN1 = Cells.Find(CN, LOOKAT:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext)
If Not CN1 Is Nothing Then
'G = 1
LBMODEL.ColumnCount = ActiveSheet.Columns.Count
LBMODEL.ColumnWidths = "2cm;3.5cm;5cm;6.5cm;5cm"
LBMODEL.Font.Size = 10
LBMODEL.List = Range("A1:E1").Value
Set MYRNG = Range(CN1, Range("C65536").End(xlUp))
For Each E In MYRNG
If InStr(E.Text, CN) Then
'.AddItem E '¨t²Î¹w³]¬°ColumnCount = 1Äæ n¥[¤J¸ê®Æ¦p¦¹°µ´N¦n
LBMODEL.AddItem 'ListBox1·s¼W¤@¦C : .ListCount -> ListBox1ªº¦C¼Æ
For J = -2 To 3
' LBMODEL.AddItem
For i = 0 To 4 'ColumnCount >1 ¬G¶·¦b·s¼W¦C¤¤¨C¤@Äæ¨Ì§Ç¥[¤J¼Æ¦r¤å¦r
'LBMODEL.AddItem
J1 = (E.Offset(0, J))
LBMODEL.List(LT - 1, i) = J1 'ListBox1ªº¦C±q0¶}©l
J = J + 1
Next
Next
ElseIf Left(E.Text, Len(CN)) <> CN Then
Exit For
End If
Next
'ElseIf CN1 Is Nothing And G = 0 Then
' MsgBox "¬dµL¦¹®Æ¸¹"
End If
Next
¤j¤j§Ú§â³¡¤À§ï¼g¦¨¬õ¦â³¡¤À´N¥i¥H¤F¡A¦ý¤S¥X²{¥t¥~¤@Ó°ÝÃD¡A´N¬O§Úªº¸ê®Æªí¦Ü¤Ö¦³¤TÓ¡A¦ý§Ú¥Ø«e³o¼Ë¼g¡A
µ{¦¡¶]¥X¨Óªºµ²ªGLISTBOX¥u«O¯d³Ì¤@Ó¸ê®Æªí·j´M¨ìªºµ²ªG¡A«e¤GÓ¸ê®Æªí§ä¨ìªºµ²ªG²Î²Î³QÂл\¤F¡A³on¦p¦ó×¥¿©O¡H
¦A³Â·Ð§A±Ð§Ú¤@¤U¡AÁÂÁ¡I |
|