如何用vba在a1:a10每个单元格中生成一个复选框
1个回答
展开全部
Sub aaa()
Dim ss As Range, a As OLEObject
For i = 1 To 10
Set ss = Range("A" & i)
Set a = ActiveSheet.OLEObjects.Add(ClassType:="Forms.CheckBox.1", Link:=False, _
DisplayAsIcon:=False, Left:=ss.Left, Top:=ss.Top, Width:=ss.Width, Height:=ss.Height)
Next i
End Sub
Dim ss As Range, a As OLEObject
For i = 1 To 10
Set ss = Range("A" & i)
Set a = ActiveSheet.OLEObjects.Add(ClassType:="Forms.CheckBox.1", Link:=False, _
DisplayAsIcon:=False, Left:=ss.Left, Top:=ss.Top, Width:=ss.Width, Height:=ss.Height)
Next i
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询