2 different fonts in one cell .....Possible??

G

Guest

Code from "Lotus Notes"
*********************************************************
..Range("E1:F1").Select
..ActiveCell.FormulaR1C1 = "Form Approved" & Chr(10) & "OMB No. 0704-0248"
With .ActiveCell.Characters(Start=1, Length=14).Font
..Name = "Arial"
..FontStyle = "Italic"
..Size = 10
End With

With .ActiveCell.Characters(Start=15, Length=17).Font
..Name = "Arial"
..FontStyle = "Regular"
..Size = 8
End With

*********************************************

Second "With" changes all the fonts to "Regular"

Any help?........ Please
 
P

PCLIVE

Try this:

Range("E1:F1").Select
ActiveCell.FormulaR1C1 = "Form Approved" & Chr(10) & "OMB No. 0704-0248"
With ActiveCell.Characters(Start:=1, Length:=14).Font
..Name = "Arial"
..FontStyle = "Italic"
..Size = 10
End With

With ActiveCell.Characters(Start:=15, Length:=17).Font
..Name = "Arial"
..FontStyle = "Regular"
..Size = 8
End With



HTH,
Paul
 
G

Guest

Error Code Generated As follows.....
Unexpected: .. ; Expected Statement


Thanks for the quick response!!!
 
P

PCLIVE

Oh well. It was worth a try. It works in a macro straight from excel. I
guess Lotus Notes needs specific VB code that is different from excel's VB
code do the same thing.

Good Luck..
 
B

Bob Phillips

You seemed to get another dot

Range("E1:F1").Select
ActiveCell.FormulaR1C1 = "Form Approved" & Chr(10) & "OMB No. 0704-0248"
With ActiveCell
With .Characters(Start:=1, Length:=14).Font
.Name = "Arial"
.FontStyle = "Italic"
.Size = 10
End With
With .Characters(Start:=15, Length:=17).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 8
End With
End With


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
G

Guest

My code only contained one dot, the first response I got is when the second
dots appeared.

I ended up splitting the code out to two cells and and did it that way.

Thanks to all that responded!!!!
 

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