啊呀,你的“向左”指定宏指向了 “矩形7_单击()”了。
害我试了很久。
Public Arr(), HH, BBB, LL
Sub 矩形8_单击() '向右
BBB = [AX1]
LL = 49 'AW列=49列
For ii = 3 To 6
HH = ii + 5
Arr = Range(Cells(ii, LL + 1), Cells(ii, LL + 33))
Range(Cells(HH, LL + 1), Cells(HH, LL + 33)).Clear
For i = 1 To 33
If BBB = Arr(1, i) Then
For j = 1 + LL To 34 + LL - i
Cells(ii, i + j - 1).Copy Cells(HH, j)
Next j
End If
Next i
Next ii
End Sub
Sub 矩形9_单击() '向左
BBB = [AX1]
LL = 49 'AW列=49列
For ii = 3 To 6
HH = ii + 10
Arr = Range(Cells(ii, LL + 1), Cells(ii, LL + 33))
Range(Cells(HH, LL + 1), Cells(HH, LL + 33)).Clear
For i = 1 To 33
If BBB = Arr(1, i) Then
For j = 33 + LL To 33 + LL - i - 1 Step -1
Cells(ii, i + j - 33).Copy Cells(HH, j)
Next j
End If
Next i
Next ii
End Sub |