|
参与一下吧。。。
- Private Sub Worksheet_SelectionChange(ByVal T As Range)
- Set d = CreateObject("Scripting.Dictionary")
- With Sheets("基础信息设置")
- r = .Cells(Rows.Count, 3).End(3).Row
- arr = .[c1].Resize(r, 4)
- End With
- For i = 2 To UBound(arr)
- s = arr(i, 1)
- d(s) = Array(arr(i, 2), arr(i, 3), arr(i, 4))
- Next
- r = Me.Cells(Rows.Count, 1).End(3).Row
- If T.Column > 1 And T.Column <= 10 And T.Row > 2 And T.Row <= r Then
- s = T.Value
- st = s & ":" & Chr(10)
- If d.exists(s) Then
- st = st & "监考次数:" & d(s)(0) & Chr(10)
- st = st & "必监考科目:" & d(s)(1) & Chr(10)
- st = st & "不监考科目:" & d(s)(2)
- End If
- MsgBox st
- End If
- End Sub
复制代码
|
|