Combo Box loaded with Excel Number Formats

E

ExcelMonkey

Does anyone know how to pull the number formats in Excel
into a combo box? I know how to load the fonts from
Excel into a combobox:

Set FontList = Application.CommandBars
("Formatting").FindControl(ID:=1728)
For N = 0 To FontList.ListCount - 1
With UserForm1.FontTypeCmbBx
.AddItem FontList.List(N + 1)
End With
Next N

However when I try the following using ID:855 I get a
object doesn't support this method or property. Is there
a way to do this.

Set NumberFormat = Application.CommandBars
("Standard").FindControl(ID:=855)
For N = 0 To NumberFormat.ListCount - 1
With UserForm1.NumFormatTypeCmbBx
.AddItem NumberFormat.List(N + 1)
End With
Next N
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top