是否可以通过 For Each 循环找出 OLEObject 是否是 ComboBox?我在工作表上有几个组合框,还有命令按钮等等。
Dim comboB As OLEObject
Dim ws As Worksheet: Set ws = ActiveSheet
For Each comboB in ws.OLEObjects
If typeName(comboB) = "ComboBox" Then
'Do something
End if
Next
问题是 TypeName(stringvalue) 仅适用于控件。谁能帮我?