Check font of a cell

S

Subodh

I want to check in a range of cells, the font of the cells. If the
font is not Times new roman
it makes the font to times new roman
and the font size to 10
also, if the font (Times New Roman) is not installed in the system
it should give a message and/or a notice.
Any tips will be appreciated
Thanks in advance.
 
M

Matthew Dyer

I want to check in a range of cells, the font of the cells. If the
font is not Times new roman
it makes the font to times new roman
and the font size to 10
also, if the font (Times New Roman) is not installed in the system
it should give a message and/or a notice.
Any tips will be appreciated
Thanks in advance.

assuming you've already defined your range as myrange-

on error goto err1
with myrange.font
..name = "Times New Roman"
..size = 10
end with
on error goto 0
err1:
msgbox("Times New Roman is not an available font")
 

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