Sub test()
Dim A, j
A = Range("a1").CurrentRegion
With DropDowns("drop down 3")
'删除
For j = .ListCount To 1 Step -1
.RemoveItem j
Next
'添加
For j = 1 To UBound(A, 2)
.AddItem A(1, j)
Next
End With
End Sub 1.rar(8.33 KB, 下载次数: 9)
Sub test()
Dim A, j
A = Range("a1").CurrentRegion
With DropDowns("drop down 3")
'删除
For j = .ListCount To 1 Step -1
.RemoveItem j
Next
'添加
For j = 1 To UBound(A, 2)
.AddItem A(1, j)
Next
End With
End Sub 1.rar(8.33 KB, 下载次数: 9)
Sub test2()
Dim A, j
A = Range("i1:cn1")
With DropDowns("drop down 3")
'删除
For j = .ListCount To 1 Step -1
.RemoveItem j
Next
'添加
For j = 1 To UBound(A, 2) Step 7
.AddItem A(1, j)
Next
End With
End Sub