ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Mixing Fonts in a single text cell (https://www.excelbanter.com/excel-programming/403055-mixing-fonts-single-text-cell.html)

Brad

Mixing Fonts in a single text cell
 
I'm close... but so far unsuccessful at finding a line or two of VBA code
that will take a cell, say A6, and arrange the text within it so that it
displays the word "Print" and a space then the Wingding font character code
0xFE which represents a little check mark inside a box.

In essence, I need to have the word, Print, in Arial, then a space, then the
checked box in Wingding. On the worksheet itself, I can highlight each part
of the text and assign the wanted font to it.

Any ideas would be greatly appreciated. My thanks in advance.

Cheers! Brad





Incidental

Mixing Fonts in a single text cell
 
Hi Brad

This code is pretty much a recorded macro thinned out a bit.

With ActiveCell.Characters(Start:=1, Length:=6).Font
.Name = "Arial"
.FontStyle = "Regular"
End With

With ActiveCell.Characters(Start:=7, Length:=1).Font
.Name = "Wingdings 3"
.FontStyle = "Regular"
End With

Hope it helps

Steve


All times are GMT +1. The time now is 03:09 PM.

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