当我向下滚动时,有可能让excel工作表上的按钮与我一起移动。
谢谢,
答案 0 :(得分:0)
Here is a way to make a Shape (like a Button) move as you move the activecell (for example,using the ARROW keys). Put the following code in the worksheet code area:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveSheet.Shapes(1)
.Top = ActiveCell.Top
.Left = ActiveCell.Offset(0, 1).Left
End With
End Sub