Home > How-To Library > Fonts

How to Add all available fonts to a combo box control.

**************************************************************** * © 2007 CodeItBetter http://www.codeitbetter.com * * This notice MUST stay intact for legal use * ****************************************************************
'Assume that you have a combobox named combo1 in form1. Then all you have to do 'is insert the following lines in th load event of the form1. Private Sub Form_load() Dim f As Long Combo1.Clear For f = 0 To VB.Screen.FontCount - 1 Combo1.AddItem VB.Screen.Fonts(f) Next f End Sub

If you would like to submit your code here please us. Do not forget to mention your name. We are always thankful to each and everyone of you who submitted their code here.