|
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Dim sj(), nL%, cTxt$, nRow%, Arr(), ds As Object
- Set ds = CreateObject("Scripting.Dictionary")
- If Target.Row = 1 Or Target.Column > 4 Or Target.CountLarge > 1 Then Exit Sub
- nL = Target.Column
- sj = Range("a" & Target.Row).Resize(1, 3).Value
- With Sheets("基础")
- nRow = .Cells(999, nL).End(xlUp).Row
- Arr = .Range("a1").Resize(nRow, nL).Value
- End With
- For i = 2 To nRow
- For j = 1 To nL - 1
- If Arr(i, j) <> sj(1, j) Then Exit For
- Next
- If j = nL And Not ds.exists(Arr(i, nL)) Then
- ds(Arr(i, nL)) = ""
- cTxt = cTxt & "," & Arr(i, nL)
- End If
- Next
- With Target.Validation
- .Delete
- If cTxt <> "" Then .Add 3, 1, 1, Mid(cTxt, 2)
- End With
- End Sub
复制代码
四级菜单1.rar
(15.83 KB, 下载次数: 1237)
四级菜单2.rar
(13.23 KB, 下载次数: 954)
四级菜单3.rar
(46.37 KB, 下载次数: 1409)
四级菜单4.rar
(19.07 KB, 下载次数: 895)
四级菜单(窗体列表框).rar
(19.75 KB, 下载次数: 1074)
大数据提速方案:
五级区域下拉菜单.rar
(567.46 KB, 下载次数: 1330)
|
评分
-
18
查看全部评分
-
|