1、点击开发工具-visual basic打开编程界面,如果没有开发工具选项,可以再文件-选项中加载
2、回到工作表,插入心型形状和部分插件,如图
3、进入编程界面Private Sub ToggleButton1_Click() Do While Toggl髫潋啜缅eButton1.Value Shapes("组合 5").IncrementRotation Range("c1").Value DoEvents With Shapes(1) If Cells(1, 5) = 1 Then i = i + 10 Else i = i - 10 End If .Top = Sin(i * (3.14 / 180)) * 100 + 100 .Left = Cos(i * (3.14 / 180)) * 100 + 100 End With LoopEnd SubSub滚动条4() Sheet1.Shapes(1).Select Selection.ShapeRange.Width = Cells(1, 4) Selection.ShapeRange.Height = Cells(1, 4)End Sub分别设置各插件数据,主要是对形状中心进行定位,并控制速度,重复中心旋转