Dim mDic1 As Scripting.Dictionary
Dim mDic2 As Scripting.Dictionary
Dim mDic3 As Scripting.Dictionary
Dim mDic4 As Scripting.Dictionary
Dim mDic5 As Scripting.Dictionary
Dim mDic6 As Scripting.Dictionary
Dim mDic7 As Scripting.Dictionary
Dim mDic8 As Scripting.Dictionary
Dim mDic9 As Scripting.Dictionary
Dim mKey1 As Variant
Dim mItem1 As Variant, mItem2 As Variant, mItem3 As Variant, mItem4 As Variant, mItem5 As Variant, mItem6 As Variant, mItem7 As Variant, mItem8 As Variant, mItem9 As Variant
Dim mRng6
Dim s6a%, s6b%, m6%, m6a%, m6b%, i6%, j6%, mRow6a%, mRow6b%
Dim mSht6 As Worksheet
Dim mRng6a As Range
Dim mStr6$, mTmp6$
Dim mSplit6
Dim mTotal6a As Long, mTotal6b As Long, mQty6 As Integer
Set mDic1 = CreateObject("scripting.dictionary")
Set mDic2 = CreateObject("scripting.dictionary")
Set mDic3 = CreateObject("scripting.dictionary")
Set mDic4 = CreateObject("scripting.dictionary")
Set mDic5 = CreateObject("scripting.dictionary")
Set mDic6 = CreateObject("scripting.dictionary")
Set mDic7 = CreateObject("scripting.dictionary")
Set mDic8 = CreateObject("scripting.dictionary")
Set mDic9 = CreateObject("scripting.dictionary")
Application.ScreenUpdating = False
With ListBox1
.RowSource = ""
End With
Set mSht6 = Worksheets("年度所得暨扣繳金額明細表")
With mSht6
With ComboBox5
.Value = .List(.ListIndex)
mTmp = .Value
End With
'mTmp = "100"
For i6 = 4 To .[a65536].End(xlUp).Row
mSplit6 = Split(.Cells(i6, 1), ".")
If mSplit6(0) = mTmp Then
mRow6a = i6
Exit For
End If
Next
For j6 = .[a65536].End(xlUp).Row To 4 Step -1
mSplit6 = Split(.Cells(j6, 1), ".")
If mSplit6(0) = mTmp Then
mRow6b = j6
Exit For
End If
Set mRng6a = .Range("p4").CurrentRegion
'MsgBox mRng6c.Address
With Application.Names.Add("mTmp6", RefersTo:=mRng6a)
mStr6 = .RefersTo
.Delete
End With
With ListBox1
.Width = .Width * 1
.ColumnCount = 11
.RowSource = mStr6
'.RowSource = mRng6a.Address(, , , 1, 1)
.ColumnHeads = True
'.List = mRng6r
End With
End With
Set mSht6 = Nothing
Set dic1 = Nothing
Set dic2 = Nothing
Set dic3 = Nothing
Set dic4 = Nothing
Set dic5 = Nothing
Set dic6 = Nothing
Set dic7 = Nothing
Set dic8 = Nothing
Set dic9 = Nothing