Hi,

I have a command button and a textbox.

When the command button is pressed, I want font size to increase. Currently I have:

Private Sub Command1_Click()
Text1.FontSize = Text1.FontSize + 2
End Sub

This works to a point, but in the fontproperty of my textbox optional fontsizes are 8,10,12,14,18,24. So the font won't increase after 14 (because there is no 16 option).

Rather than having Text1.FontSize + 2, how do I code it so that it moves to the next biggest fontsize?

Thanks.