Next i
Sheet17.[b2] = TextBox1
ActiveSheet.Shapes("Picture 1").Select
Selection.Formula = "样表!$A$6K$42"
End Sub
Private Sub ListBox1_Click()
Dim m As Long, i As Long, ar
ListBox2.Clear
ListBox3.Clear
Set ar = d1(ListBox1.Text)
dk = ar.keys
dt = ar.Items
For i = 0 To ar.Count - 1
ListBox3.AddItem dt(i)
ListBox2.AddItem dk(i)
Next
End Sub
Private Sub UserForm_Initialize()
Dim n As Long, i As Long, arr
n = Sheet1.[A65536].End(xlUp).Row
arr = Sheet1.[a1].Resize(n, 59)
Application.ScreenUpdating = False
On Error Resume Next
For j = 2 To 6
For i = 2 To n
xx = arr(1, j) & ""
yy = arr(i, j) & ""
zz = arr(i, 1) & ""
If d1.Exists(xx) = False Then Set d1(xx) = New Dictionary
d1(xx)(zz) = yy
Next
Next
userform1.ListBox1.List = d1.keys
Application.ScreenUpdating = True
End Sub作者: hnnyxzh 时间: 2011-9-10 09:57