|
楼主 |
发表于 2022-11-28 15:26
|
显示全部楼层
Sub TEST_A1()
Dim AA, BB, L(2), K%
With ActiveSheet
Set AA = .DrawingObjects("ButtonA")
Set BB = .DrawingObjects("ButtonB")
L(1) = AA.Left + 1
L(2) = L(1) + AA.Width - BB.Width - 2
K = 3 - BB.Text
BB.Left = L(K): BB.Top = AA.Top + 2.3
BB.Text = K: Beep
End With
End Sub
Sub TEST_B1()
Dim K%
K = ActiveSheet.DrawingObjects("ButtonB").Text
Range("e11:f20").Columns(K).ClearContents
End Sub
老师再请帮忙下如果代码 Range("e11:f20").Columns(K).ClearContents 换成
左边按钮代码是
Range("A14").Copy Range("I12:I41")
Range("B14").Copy Range("J12:J41")
右边按钮代码是
Range("A17").Copy Range("I12:I41")
Range("B17").Copy Range("J12:J41")
要怎么做呢
Xl0000233.zip
(17.25 KB, 下载次数: 1)
|
|