我在excel VBA工作,我想获得组合框中所有字体的列表
任何人都可以帮助我
我尝试了这个代码,但我在listcount中收到错误:
...
Set FontList = Application.CommandBars("Formatting").FindControl(ID:=1728)
' Put the fonts into column A
*For i = 0 To FontList.ListCount - 1*
combobox.AddItems FontList.List(i + 1)
Next i
' Delete temp CommandBar if it exists
On Error Resume Next
TempBar.Delete
End Sub
Run Code Online (Sandbox Code Playgroud)