ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Setting properties to combobox (https://www.excelbanter.com/excel-programming/310114-setting-properties-combobox.html)

Stefan[_6_]

Setting properties to combobox
 
I create a combobox on a new sheet and I want the font to
be "Arial" size=9 in the listbox. I can not figure out how
to write that code. Everything else works such as
ListFillRange and LinkedCell. Can somebody help?

Stefan



mangesh_yadav[_132_]

Setting properties to combobox
 
In the properties, font, for the combobox (after right-clicking on th
control) do the required setting

- Manges

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Setting properties to combobox
 
Sub SetFont()
Dim cbox As MSForms.ComboBox
Set cbox = ActiveSheet.OLEObjects("Combobox1").Object
cbox.Font.Name = "Ariel"
cbox.Font.Size = 9
End Sub

--
Regards,
Tom Ogilvy

"Stefan" wrote in message
...
I create a combobox on a new sheet and I want the font to
be "Arial" size=9 in the listbox. I can not figure out how
to write that code. Everything else works such as
ListFillRange and LinkedCell. Can somebody help?

Stefan






All times are GMT +1. The time now is 09:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com