Dim buttomcombinations(1 To 2) As CommandButtonclass
Private Sub Workbook_Open()
For x = 1 To 2
Set buttomcombinations(x) = New CommandButtonclass
Set buttomcombinations(x).com = Sheet1.OLEObjects("CommandButton" & x).Object
Next x
'把控件对象归类到类模块
Dim buttomcombinations(1 To 2) As CommandButtonclass
Private Sub Workbook_Open()
For x = 1 To 2
Set buttomcombinations(x) = New CommandButtonclass
Set buttomcombinations(x).com = Sheet1.OLEObjects("CommandButton" & x).Object
Next x
'把控件对象归类到类模块