View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default cell.Characters and Fonts

If you are changing the font of all text in a cell, or multiple cells, no
need to use "Characters", simply
rng.Font.Name = "Symbol"
(typically where the text is a single character)

The first time the Font object is called in an Excel session it can be a
little slow
(if very slow a suspect culprit might be printer). Normally subsequent
calls should be fine.

Regards,
Peter T

"CathyWeyant" wrote in message
...
I am using Excel 2003 and VBA 6.5

Recently I have been automatically converting text in cells that are
formatted with the Symbol Font set to unicode when the subroutine

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)

is triggered. I am changing the text and fonts by using the
range.characters. This all works fine. The only problem is that it is
slow
when there is a large amount of text pasted a the cell.

But the mystery deepens - if I click on the Dialog "Insert, Symbol" then
repeat the same task - my program is lightening fast. I think somehow the
dialog is cacheing the font set in Excel and this is why it is faster.

Is there a way I can do this programatically without telling the users to
click on Insert, Symbol first before doing tasks that would be slow.