- ©«¤l
- 60
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 64
- ÂI¦W
- 0
- §@·~¨t²Î
- w7-32
- ³nÅ骩¥»
- 2013.2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2014-11-23
- ³Ì«áµn¿ý
- 2016-6-6
|
¸É¥R
²M³æªº¸ü¤J¬O±q¥t¤@ÓSheets- Private Sub ComboBox1_Change()
- If Me.ComboBox1.ListIndex > 0 Then
- Me.ListBox1.Visible = True
- i = Me.ComboBox1.ListIndex
- Sheets("¾r¾p").Select
- X = Cells(65536, i + 1).End(xlUp).Row
- ListBox1.Height = 20 * X
- UserForm.Height = 15 * X + 60
- ListBox1.Clear
- For Each xR In Range(Cells(2, i + 1), Cells(X, i + 1))
- ListBox1.AddItem xR.Value
- Next
- ListBox1.ListIndex = 0
- Sheets(1).Select
- End If
- End Sub
- Private Sub ListBox1_Click()
- Sheets(1).Select
- Cells.Interior.ColorIndex = xlNone
- For j = 1 To ListBox1.ListCount - 1
- If ListBox1.Selected(j) = True Then
- gx = ListBox1.Value
- Set cx = Sheets(1).Cells.Find(gx, after:=[A1])
- If cx Is Nothing Then
- ActiveCell = ListBox1.Value
- If ActiveCell.Column = 1 Then
- ActiveCell.Offset(1, 0).Select
- Else
- ActiveCell.Offset(0, -1).Select
- End If
- Else
- cx.Interior.ColorIndex = 3
- MsgBox "¦W³æ«½Æ¥[¤J" & cx.Address
- End If
- End If
- Next
- End Sub
- Private Sub UserForm_Initialize()
- Me.ListBox1.Visible = False
- Rx = Sheets("¾r¾p").[A65536].End(xlUp).Row
- Me.ComboBox1.List = Sheets("¾r¾p").Range("A2:A" & Rx).Value
- Me.ComboBox1.ListRows = Rx
- Me.ComboBox1 = "¯Z§O"
- UserForm.Height = 57
- End Sub
- Private Sub ComboBox1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
- ComboBox1.DropDown
- Me.ListBox1.Visible = False
- Me.ComboBox1 = "¯Z§O"
- UserForm.Height = 57
- End Sub
½Æ»s¥N½X |
|